Skip to main content

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 repository contains the geo-location engines for the Python implementation of the Pipeline API.

Project description

51Degrees Geo-Location Engines

51Degrees v4 Location Python

Developer Documentation

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 3.5+
  • The flask python library to run the web examples
  • The gitversion python library using pip install gitversion

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.
from fiftyone_location.location_pipelinebuilder import LocationPipelineBuilder
pipeline = LocationPipelineBuilder(resource_key="YOUR_RESOURCE_KEY").build()
fd = pipeline.create_flowdata()
fd.evidence.add("query.51D_Pos_latitude", "40.730610")
fd.evidence.add("query.51D_Pos_longitude", "-73.935242")
fd.process()
print(fd.location.town.value())

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:

python -m examples.cloud.gettingstarted

To run the web example navigate into Examples folder:

Linux

Execute export FLASK_APP=web where web is the example file, and start your application via flask run.

Windows

Execute $env:FLASK_APP = "web" where web is the example file, and start your application via flask run.

Project details


Download files

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

Source Distribution

fiftyone_location-4.2.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

fiftyone_location-4.2.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file fiftyone_location-4.2.1.tar.gz.

File metadata

  • Download URL: fiftyone_location-4.2.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.13

File hashes

Hashes for fiftyone_location-4.2.1.tar.gz
Algorithm Hash digest
SHA256 817a3ddcd395bcace0b524bdbc0d803bb88306dbb39c70724dc35efb10f3a292
MD5 0ca1f2f34c895592e32e21ba93879887
BLAKE2b-256 811bc368cd8ca5df9bde5347a9acd05da5914b4f7900066c253633f51c58f9fe

See more details on using hashes here.

File details

Details for the file fiftyone_location-4.2.1-py3-none-any.whl.

File metadata

  • Download URL: fiftyone_location-4.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.13

File hashes

Hashes for fiftyone_location-4.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0d8fe01181c8f2b7938f23aaea1f512ff48486831757b2ccbc64a226b335aa51
MD5 8547df297bdd0988e5a88c1ab259ea23
BLAKE2b-256 5776316995bd53850c65be814d9865f8a8b5b19f4aa74a03e229abeeced56eab

See more details on using hashes here.

Supported by

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