Skip to main content

Python bindings for the Radar API

Project description

radar-python

Python library for the Radar API https://radar.io/documentation/api

The Radar Python library provides convenient access to Radar's APIs from your python applications or command line.

CircleCI

Installation

You don't need this source code unless you want to modify the package. If you just want to use the package, just run:

pip install radar-python

Requirements

Python 3.4+ (PyPy supported)

Documentation

See the Python API docs.

Usage

The radar client needs to be initialized with your project’s secret key which is available in your Radar Dashboard.

import os
from radar import RadarClient

# initialize client
radar = RadarClient(os.environ["RADAR_SECRET_KEY"])

# get a geofence by id
geofence = radar.geofences.get(id='123')

# list geofences
radar.geofences.list()

Full Endpoint List:

Users:

radar.users.list
radar.users.get(id='1')
radar.users.delete(id='1')

Geofences

radar.geofences.list()
radar.geofences.get(id=’123’)
radar.geofences.get(tag=’store’, externalId=’123’)
radar.geofences.list_users(id='123')
radar.geofences.create({ 'type': 'circle', ... })
radar.geofences.delete(id='123')
radar.geofences.delete(tag=’store’, externalId=’123’)

Events

radar.events.list()
radar.events.get(id='123')
radar.events.delete(id='123')
radar.events.verify(id='123', 'accept')

Context

radar.context.get(latitude=40.7041895, longitude=-73.9867797)
radar.context.get(coordinates=(40.7041895, -73.9867797))

Geocoding

radar.geocode.forward(query=’20 jay st brooklyn’)
radar.geocode.reverse(coordinates=(40.7041895, -73.9867797))
radar.geocode.reverse(latitude=40.7041895, longitude=-73.9867797)
radar.geocode.ip(ip=’107.77.199.117’)
radar.geocode.ip() # defaults to current ip

Search

radar.search.users(near=[lat,long])
radar.search.geofences(near=[lat,long])
radar.search.places(near=[lat,long])
radar.search.autocomplete(query=’20 jay st’, near=[lat, long])

Routing

radar.route.distance(origin=[lat,lng], destination=[lat,lng], modes=’car’, units=’metric’)

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

radar-python-0.0.1.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

radar_python-0.0.1-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file radar-python-0.0.1.tar.gz.

File metadata

  • Download URL: radar-python-0.0.1.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for radar-python-0.0.1.tar.gz
Algorithm Hash digest
SHA256 3589ce7408003b71f8962e036ebab724203e5831b93081989628ed4a55ba3af6
MD5 dae59ef4056b16cae3e40a4ac46b005d
BLAKE2b-256 b9391e73fdc3fa2b51ca91f1e01bd1f4156196bd9a2f12d7040a974294e7e013

See more details on using hashes here.

File details

Details for the file radar_python-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: radar_python-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for radar_python-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 758c5e30e4f5692af4576642f3a286044066bfaea1994269e3012dd5de468578
MD5 0d1a7860e774ff22877fe506f9970630
BLAKE2b-256 85f43129e5e45058dbcec7ff14bfff1103a36e5e6940a4beea75ee9e4c375b3e

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