Introduction
This project contains the geo-location engines for the Python implementation of the 51Degrees 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)
Requirements
- Python 2.7 or Python 3
- The
flask
python library to run the web examples
Installation and Examples
From PyPI
pip install fiftyone_location
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 examplelocation.py
- Run the example with
python examplelocation.py
- Feel free to try different locations and property values.
For more in-depth examples, check out the examples page in the documentation.
From GitHub
If you've cloned the GitHub repository, you will be able to run the examples directly:
python3 -m examples.cloud.gettingstarted
To run the web example:
Linux
Execute export FLASK_APP=
with the name of the web example file, then flask run
.
Windows
Execute $env:FLASK_APP = "x"
with the name of the example file, then flask run
.