Device Detection services for 51Degrees Pipeline

fiftyone_devicedetection_onpremise.devicedetection_datafile.DeviceDetectionDataFile Class Reference

Detailed Description

Extension of the DataFile class for DeviceDetection This helps construct the update url based on url parameters provided by the engine, provides methods to get the published date and update date of the datafile and refreshes the on premise engine when the datafile is updated.

Inheritance diagram for fiftyone_devicedetection_onpremise.devicedetection_datafile.DeviceDetectionDataFile:

[legend]

Collaboration diagram for fiftyone_devicedetection_onpremise.devicedetection_datafile.DeviceDetectionDataFile:

[legend]

Public Member Functions

 __init__ (self, *args, **kwargs)
 get_url_formatter (self)
 Generate a url for the data file update service to call These parameters are passed in to the constructor of the Device Detection On Premise engine.
 swig_date_to_date (self, swig_date)
 Helper function to convert the SWIG wrapper date object into a python date.
 get_date_published (self)
 Get the date the datafile was published.
 get_next_update (self)
 Get the date of the next datafile update.
 refresh (self)
 Once the datafile has updated, refresh the engine.

Public Member Functions inherited from fiftyone_pipeline_engines::datafile::DataFile

 __init__ (self, flow_element, identifier, update_url_params=None, data=None, path="", temp_directory=tempfile.gettempdir(), create_temp_copy=True, auto_update=True, file_system_watcher=True, polling_interval=30, update_time_maximum_randomisation=10, verify_md5=True, decompress=True, download=True, verify_if_modified_since=True, update_on_start=False)
 get_date_published (self)
 get_next_update (self)
 refresh (self, identifier)
 get_update_url (self)
 get_url_formatter (self)

Protected Attributes

 _data_update_use_url_formatter = kwargs.pop("data_update_use_url_formatter", None)

Additional Inherited Members

Public Attributes inherited from fiftyone_pipeline_engines::datafile::DataFile

 flow_element
 identifier
 update_url_params
 temp_directory
 create_temp_copy
 auto_update
 file_system_watcher
 polling_interval
 update_time_maximum_randomisation
 verify_md5
 decompress
 download
 verify_if_modified_since
 update_on_start
bool updated_on_start
 data
 path
bool updating

Constructor & Destructor Documentation

◆ __init__()

fiftyone_devicedetection_onpremise.devicedetection_datafile.DeviceDetectionDataFile.__init__ ( self,
* args,
** kwargs )

Member Function Documentation

◆ get_date_published()

fiftyone_devicedetection_onpremise.devicedetection_datafile.DeviceDetectionDataFile.get_date_published ( self)

Get the date the datafile was published.

Returns
date

◆ get_next_update()

fiftyone_devicedetection_onpremise.devicedetection_datafile.DeviceDetectionDataFile.get_next_update ( self)

Get the date of the next datafile update.

Returns
date

◆ get_url_formatter()

fiftyone_devicedetection_onpremise.devicedetection_datafile.DeviceDetectionDataFile.get_url_formatter ( self)

Generate a url for the data file update service to call These parameters are passed in to the constructor of the Device Detection On Premise engine.

Returns
string : URL

◆ refresh()

fiftyone_devicedetection_onpremise.devicedetection_datafile.DeviceDetectionDataFile.refresh ( self)

Once the datafile has updated, refresh the engine.

◆ swig_date_to_date()

fiftyone_devicedetection_onpremise.devicedetection_datafile.DeviceDetectionDataFile.swig_date_to_date ( self,
swig_date )

Helper function to convert the SWIG wrapper date object into a python date.

Returns
date

Member Data Documentation

◆ _data_update_use_url_formatter

fiftyone_devicedetection_onpremise.devicedetection_datafile.DeviceDetectionDataFile._data_update_use_url_formatter = kwargs.pop("data_update_use_url_formatter", None)
protected