Device Detection services for 51Degrees Pipeline

fiftyone_devicedetection_onpremise.devicedetection_onpremise_pipelinebuilder.DeviceDetectionOnPremisePipelineBuilder Class Reference

Detailed Description

The Device Detection Pipeline Builder allows you to easily Construct a pipeline containing the device detection cloud engine.

Internal function for getting evidence keys used by cloud engines

Inheritance diagram for fiftyone_devicedetection_onpremise.devicedetection_onpremise_pipelinebuilder.DeviceDetectionOnPremisePipelineBuilder:

[legend]

Collaboration diagram for fiftyone_devicedetection_onpremise.devicedetection_onpremise_pipelinebuilder.DeviceDetectionOnPremisePipelineBuilder:

[legend]

Public Member Functions

 __init__ (self, settings=None, usage_sharing=True, **kwargs)
 Constructor for Device Detection Pipeline Builder Depending on parameters passed through, builds a pipeline with either the cloud or on premise device detection engines.

Public Member Functions inherited from fiftyone_pipeline_core::pipelinebuilder::PipelineBuilder

 __init__ (self, settings={})
 get_sequence_elements (self)
 get_javascript_elements (self)
 get_setheader_elements (self)
 add (self, flow_element)
 build (self)
 add_logger (self, logger)
 build_from_configuration (self, config)

Protected Member Functions

 _map_properties_names (self, mappings, arguments)

Protected Member Functions inherited from fiftyone_pipeline_core::pipelinebuilder::PipelineBuilder

 _get_suppress_process_exceptions (self, config)
 _map_properties_names (self, mappings, arguments)

Additional Inherited Members

Public Attributes inherited from fiftyone_pipeline_core::pipelinebuilder::PipelineBuilder

list flow_elements
 logger
bool add_javaScriptbuilder
 add_sequence_element
 add_json_builder_element
 add_javascript_builder_element
 add_set_header_element
 javascriptbuilder_settings
bool use_setheader_properties
 data_file_update_service
bool suppress_process_exceptions
bool auto_close_elements

Constructor & Destructor Documentation

◆ __init__()

fiftyone_devicedetection_onpremise.devicedetection_onpremise_pipelinebuilder.DeviceDetectionOnPremisePipelineBuilder.__init__ ( self,
settings = None,
usage_sharing = True,
** kwargs )

Constructor for Device Detection Pipeline Builder Depending on parameters passed through, builds a pipeline with either the cloud or on premise device detection engines.

General pipeline settings:

@type javascript_builder_settings: dict

Parameters
javascript_builder_settingsparameters for the pipeline's JavaScript builder to populate additional evidence from the clientside.
  • obj_name: the name of the client side object with the JavaScript properties in it ('fod' by default)
  • protocol: The protocol ("http" or "https") used by the client side callback url. This can be overridden with header.protocol evidence
  • host The host of the client side callback url. This can be overridden with header.host evidence.
  • endpoint The endpoint of the client side callback url
  • enable_cookies - whether cookies should be enabled
  • minify: Whether to minify the JavaScript @type cache: Cache
cacheNot supported by the on-premise engine. Supplying one raises an exception class

Cloud Engine Settings:

@type resource_key: string

Parameters
resource_keythe 51Degrees cloud resource key

On Premise Engine Settings

@type usage_sharing : bool

Parameters
usage_sharing: Whether to enable usage sharing if using the on premise engine @type data_file_path: string
data_file_pathpath to the data file @type auto_update: bool
auto_updatewhether to automatically update the datafile when required @type restricted_properties: list
restricted_propertiesList of property keys to limit the engine to @type license_keys: string
licence_keyslicencekeys to use for the data file update service @type download: bool
downloadwhether to download the datafile or keep it in memory when it is returned from the datafile update service @type max_matched_useragent_length: int
max_matched_useragent_lengthLimit in bytes on the length of a single header such as User-Agent, of a pseudo header including the separators between its values, and of the matched User-Agent. A value longer than the limit is ignored and detection moves on to the next header. The limit applies whether or not update_matched_useragent is on. Left unset, the native default of 500 applies. A larger limit raises the memory each set of results holds. @type update_matched_useragent: bool
update_matched_useragentTrue if the detection should record the matched characters from the target User-Agent, which the UserAgents property returns. On by default, as the native code sets it. Set it to False when UserAgents is not needed, which saves recording the characters. @type drift: int
driftSet maximum drift in hash position to allow when processing HTTP headers @type difference: int
differenceset the maximum difference to allow when processing HTTP headers. The difference is the difference in hash value between the hash that was found, and the hash that is being searched for. By default this is 0. @type allow_unmatched : bool
allow_unmatchedTrue if there should be at least one matched node in order for the results to be considered valid. By default, this is false @type performance_profile: string
performance_profileoptions are: LowMemory, MaxPerformance, Balanced, BalancedTemp, HighPerformance. Balanced by default, as in the native code. @type reuse_temp_file: bool
reuse_temp_fileIndicates that an existing temp file may be used. This should be selected if multiple instances wish to use the same file to prevent high disk usage. @type concurrency: int
concurrencydefaults to the number of cpus in the machine @type update_on_start : bool
update_on_start: When this is set to true the datafile is updated / downloaded immediately on initialisation. This is useful if no initial datafile is present. @type file_system_watcher: bool
file_system_watcherwhether to check the datafile's path for changes and update the connected FlowElement's data @type polling_interval: int
polling_intervalHow often to poll for updates to the datafile (minutes) @type update_time_maximum_randomisation : int
update_time_maximum_randomisation: Maximum randomisation offset in seconds to polling time interval @type data_update_verify_md5 : bool @type create_temp_copy: bool
create_temp_copywhether to copy datafile to temporary location when updating @type data_update_url: string
data_update_urlbase url for the datafile update service
data_file_update_serviceservice for the pipeline to use for auto updates instead of the default @type data_file_update_service: DataFileUpdateService
data_update_use_url_formatterThis must be set to false to prevent the API from appending the query string parameters that are required when calling the 51Degrees Distributor service. @type data_update_use_url_formatter: bool

Member Function Documentation

◆ _map_properties_names()

fiftyone_devicedetection_onpremise.devicedetection_onpremise_pipelinebuilder.DeviceDetectionOnPremisePipelineBuilder._map_properties_names ( self,
mappings,
arguments )
protected