Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

51Degrees Device Detection Engines - Cloud

51Degrees v4 Device Detection Python

Developer Documentation | Available Properties

Introduction

From PyPi

pip install fiftyone-devicedetection-cloud

You can confirm this is working with the following micro-example.

  • Create a resource key for free with the 51Degrees configurator. This defines the properties you want to access.
  • On the 'implement' page of the configurator, copy the resource key and replace YOUR_RESOURCE_KEY in the example below. Save this as exampledd.py
  • Run the example with python exampledd.py
  • Feel free to try different user-agents and property values.
from fiftyone_devicedetection_cloud.devicedetection_cloud_pipelinebuilder import DeviceDetectionCloudPipelineBuilder
pipeline = DeviceDetectionCloudPipelineBuilder({"resource_key": "YOUR_RESOURCE_KEY"}).build()
fd = pipeline.create_flowdata()
fd.evidence.add("header.user-agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148")
fd.process()
print(fd.device.ismobile.value())

For more in-depth examples, check out the examples page in the documentation.

From GitHub

Examples

If you've cloned the GitHub repository, you will be able to run the examples in the fiftyone_devicedetection_examples directory.

Tests

To run the tests use:

python -m unittest discover -s tests -p test*.py -b

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fiftyone_devicedetection_cloud-4.5.0a21.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file fiftyone_devicedetection_cloud-4.5.0a21.tar.gz.

File metadata

File hashes

Hashes for fiftyone_devicedetection_cloud-4.5.0a21.tar.gz
Algorithm Hash digest
SHA256 56b2ed8c69cb2db656290b3d04758951e22a40d9ab13b8803d3ed16a520302c7
MD5 6e37c20003d3d5c9580536dd1c25d0e4
BLAKE2b-256 a1ed7f8a34fc2584957f59703fdfbcd8d69a55675ba4c12aef3cc30fc40b5cff

See more details on using hashes here.

File details

Details for the file fiftyone_devicedetection_cloud-4.5.0a21-py3-none-any.whl.

File metadata

File hashes

Hashes for fiftyone_devicedetection_cloud-4.5.0a21-py3-none-any.whl
Algorithm Hash digest
SHA256 dfcb14a14af9bde97e546aee71a462a1351cc1b30d41c85fb03e1629127b5690
MD5 0190b94e800ef21544fb20576485e612
BLAKE2b-256 4b84ea2954bd315e88759950a0d000ccdfccaefd478c210ae65fdf092d186597

See more details on using hashes here.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page