Developer Documentation | Available Properties
Introduction
This project contains 51Degrees Device Detection engines that can be used with the Pipeline API.
The Pipeline 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 git repository uses submodules, to clone the git repository run:
or if already cloned run the following to obtain all sub modules.:
Requirements
- Python 3.5+
- The
flask
python library to run the web examples - Git Large File System (LFS) for sub module device-detection-cxx\device-detection-data
- Additional requirements are for the on-premise Device-Detection Engine.
Folders
fiftyone_devicedetection
- references both cloud and on-premise packages, contains generic Device-Detection Pipeline Builder.examples
- examples for switching between cloud and on-premise.
fiftyone_devicedetection_cloud
- cloud implementation of the engines.examples
- examples for cloud device-detection.tests
- tests for the cloud engine and examples.
fiftyone_devicedetection_onpremise
- uses a native library which is built during setup to provide optimal performance and low latency device detections.examples
- examples for on-premise device-detection.tests
- tests for the on premise engine and examples.
fiftyone_devicedetection_shared
- common components used by the cloud and on-premise packages.
Installation
PyPi
To install all packages, run:
The fiftyone-devicedetection
package references both cloud and on-premise packages. If you do not want the on-premise engine or cannot meet the requirements for installing on-premise then install the cloud package on its own:
See the cloud package readme for more details specifics.
GitHub
It is recommended to use Pipenv when build packages. Pipenv will ensure all the required packages for building and testing are available e.g. cython
and flask
.
To install packages for development run the following commands:
Alternatively, if you have make installed you can run the make file:
other targets:
cloud
- only setup packages required for cloudonpremise
- only setup packages required for onpremisetest
- run package testsclean
- remove temporary files created when building extensions
For convenience, there is also a powershell setup script called setup.ps1
. To run it, you may need to update the execution policy to allow unsigned scripts to execute:
Examples
Then, to run an example, navigate into one of the module directories that contain an examples subfolder, e.g.
Then run an example: