Device Detection services for 51Degrees Pipeline

fiftyone_devicedetection.devicedetection_pipelinebuilder.DeviceDetectionPipelineBuilder 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.devicedetection_pipelinebuilder.DeviceDetectionPipelineBuilder:

[legend]

Collaboration diagram for fiftyone_devicedetection.devicedetection_pipelinebuilder.DeviceDetectionPipelineBuilder:

[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_javascript_elements (self)
 get_setheader_elements (self)
 add (self, flow_element)
 build (self)
 add_logger (self, logger)
 build_from_configuration (self, config)

Additional Inherited Members

Public Attributes inherited from fiftyone_pipeline_core::pipelinebuilder::PipelineBuilder

list flow_elements
 logger
bool add_javaScriptbuilder
 javascriptbuilder_settings
bool use_setheader_properties
 data_file_update_service
bool suppress_process_exceptions
bool auto_close_elements

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

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

Constructor & Destructor Documentation

◆ __init__()

fiftyone_devicedetection.devicedetection_pipelinebuilder.DeviceDetectionPipelineBuilder.__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
cacheAn instance of the fiftyone.pipeline.engines.cache, for the cloud engine only. The on-premise engine raises an exception if one is supplied class

Cloud Engine Settings:

@type resource_key: string

Parameters
resource_keythe 51Degrees cloud resource key @type cloud_request_origin: string
cloud_request_originthe value to use for the Origin header when making requests to the cloud service

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_useragents_length : int
Numberof characters to consider in the matched User-Agent. Ignored if update_matched_useragent is false @type update_matched_useragent:
update_matched_useragent: True if the detection should record the matched characters from the target User-Agent @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 @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 verify_md5 : bool @type create_temp_copy: bool
create_temp_copywhether to copy datafile to temporary location when updating @type data_file_update_base_url: string
data_file_update_base_urlbase url for the datafile update service