{"id":44950,"library":"fiftyone-devicedetection-shared","title":"51Degrees Device Detection Shared","description":"The 51Degrees Pipeline API is a generic web request intelligence and data processing solution with the ability to add a range of 51Degrees and/or custom plug ins (Engines). This project contains 51Degrees Device Detection engines that can be used with the Pipeline API. Current version is 4.5.52, released on PyPI with regular updates.","status":"active","version":"4.5.52","language":"python","source_language":"en","source_url":"https://github.com/51Degrees/fiftyone-devicedetection-shared","tags":["device detection","51degrees","pipeline","user-agent","web intelligence"],"install":[{"cmd":"pip install fiftyone-devicedetection-shared","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Core Pipeline API dependency","package":"fiftyone-pipeline-core","optional":false},{"reason":"Hash-based device detection data files","package":"fiftyone-devicedetection-hash","optional":true},{"reason":"On-premise device detection data files","package":"fiftyone-devicedetection-onpremise","optional":true}],"imports":[{"wrong":"from fiftyone_devicedetection_shared import FiftyOneDeviceDetectionSharedEngine","symbol":"FiftyOneDeviceDetectionSharedEngine","correct":"from fiftyone_devicedetection_shared import FiftyOneDeviceDetectionSharedEngine"}],"quickstart":{"code":"from fiftyone_devicedetection_shared import FiftyOneDeviceDetectionSharedEngine\nfrom fiftyone_pipeline_core import PipelineBuilder\n\n# Initialize the engine with a data file\nengine = FiftyOneDeviceDetectionSharedEngine(\n    data_file='path/to/datafile.dat',\n    licence_keys=os.environ.get('FOD_LICENCE_KEY', '')\n)\npipeline = PipelineBuilder().add(engine).build()\n\n# Process a flow element\nfrom fiftyone_pipeline_core.flowelement import FlowElement\nflow_element = FlowElement()\nflow_element.evidence.add('header.user-agent', 'Mozilla/5.0...')\npipeline.process(flow_element)\n\n# Access device data\ndevice = flow_element.device\nprint(device.devicetype)","lang":"python","description":"Basic usage: create engine, build pipeline, process a user-agent, and read device properties."},"warnings":[{"fix":"Update imports to use underscores: from fiftyone_devicedetection_shared import ...","message":"In version 4.x, the import path changed from `fiftyone.devicedetection.shared` (dots) to `fiftyone_devicedetection_shared` (underscores). Existing code using the old dotted path will break.","severity":"breaking","affected_versions":"<4.0.0 to >=4.0.0"},{"fix":"When importing, replace hyphens with underscores: from fiftyone_devicedetection_shared import ...","message":"The PyPI package name uses hyphens (fiftyone-devicedetection-shared) but Python import module uses underscores (fiftyone_devicedetection_shared). Always use underscores in import statements.","severity":"gotcha","affected_versions":">=4.0.0"},{"fix":"Migrate to using a separate CloudRequestEngine and add it to the pipeline instead.","message":"The `cloud_engine` parameter is deprecated in favor of specifying cloud settings via `CloudRequestEngine` in `fiftyone-pipeline-cloud`. Direct use of `cloud_engine` in older code may stop working in future versions.","severity":"deprecated","affected_versions":">=4.3.0"},{"fix":"Set the environment variable `FOD_LICENCE_KEY` or pass `licence_keys` parameter to the engine.","message":"Licence keys are required for production use. Without a valid key, the engine may throw a `LicenceKeyException` or produce limited data.","severity":"gotcha","affected_versions":">=4.0.0"}],"env_vars":null,"search_vec":"'4.5.52':51 '51degrees':1,6,27,36,60 'abil':21 'add':23 'agent':64 'and/or':28 'api':8,47 'contain':35 'current':48 'custom':29 'data':16 'detect':3,38,59 'devic':2,37,58 'engin':32,39 'generic':11 'in':31 'intellig':14,66 'pipelin':7,46,61 'plug':30 'process':17 'project':34 'pypi':54 'rang':25 'regular':56 'releas':52 'request':13 'share':4 'solut':18 'updat':57 'use':43 'user':63 'user-ag':62 'version':49 'web':12,65","created_at":"2026-06-07T12:52:37.453484+00:00","updated_at":"2026-06-07T12:52:37.453484+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'FiftyOneDeviceDetectionSharedEngine' from 'fiftyone_devicedetection_shared' (/tmp/tmp2tcuh12p/venv/lib/python3.12/site-packages/fiftyone_devicedetection_shared/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://51degrees.com/","github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","analytics"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}