python-gmaps Documentation

Similar documents
Home Assistant Documentation

Package mapsapi. March 12, 2018

Platypus Analytics Documentation

Inflow Documentation. Release Jaap Broekhuizen

When.py Documentation

Last updated: Access to API. SERVER_DOMAIN/api/api.php

Torndb Release 0.3 Aug 30, 2017

Mobile Century data documentation

Redis Timeseries Documentation

treacle Documentation

Package rmapzen. October 7, 2018

OSMnx Documentation. Release. Geoff Boeing

Python Datetime TZ Documentation

USER MANUAL. Quick Maps TABLE OF CONTENTS. Version: 2.1

RiotWatcher Documentation

Django Map Widgets Documentation

thingspeak Documentation

Tawhiri Documentation

dota2api Documentation

Django Map Widgets Documentation

Package gmapsdistance

USER MANUAL. Quick Maps TABLE OF CONTENTS. Version: 1.0

pybtsync Documentation

petfinder-api Documentation

Moxie Notifications Documentation

OTX to MISP. Release 1.4.2

sptrans Documentation

pylog Documentation Release nir0s

SmartPlatform data and interface overview

Archer Documentation. Release 0.1. Praekelt Dev

Android Locations. Android Smartphone Programming

bottle-rest Release 0.5.0

FIQL Parser. Release 0.15

API Wrapper Documentation

Python Overpass API Documentation

Durga Documentation. Release dev2. transcode

Moxie Library API Documentation

Quriiri HTTP MT API. Quriiri HTTP MT API v , doc version This document describes the Quriiri HTTP MT API version 1 (v1).

f5-icontrol-rest Documentation

Saving an Alignment on the Smart Aligner Tool

CacheControl Documentation

Threat Stack Python Client Documentation

geoip2 Documentation Release Gregory Oschwald

e24paymentpipe Documentation

pyshk Documentation Release Jeremy Low

processing data with a database

solrq Documentation Release Michał Jaworski

tld Documentation Release 0.9 Artur Barseghyan

YouTube API Wrapper Documentation

It s about time! Aymeric Augustin DjangoCon Europe T16:10:00+02:00

Genesys Mobile Services API Reference. Phone Number Validation API

Package geoplot. February 15, 2013

Sigox APIs beginners API HOW TO. External Use, version 1.3

eoddata-client Documentation

geocode3 Purpose Retrieves coordinates via Google Geocoding API V3 (geocoding) or Retrieves addresses via Google Geocoding API V3 (reverse geocoding)

A Trip Planner for the Itract System Supporting Real-time Updates

python-hologram-api Documentation

wm_metrics Documentation

maya-cmds-help Documentation

iqoptionapi Release Jan 13, 2018

Package opencage. January 16, 2018

Tagalog Documentation

Python Finite State Machine. Release 0.1.5

DynamiX Documentation

Day One Export Documentation

MyGeotab Python SDK Documentation

morbo Documentation Release 0.9 Elisha Cook

Get Weather Data Documentation

flask-jwt-simple Documentation

Pusher Documentation. Release. Top Free Games

IPConfigure Embedded LPR API

fiscalyear Documentation

datastream Documentation

Server - The Tigo platform and urls associated with the api Client - Third party user with api access to the Tigo platform and/or Tigo api.

Presented by: Megan Bishop & Courtney Valentine

Wearabouts API Reference

Using the Startup Wizard

Django Timezone Utils Documentation

Mercantile Documentation

Android Programming Lecture 9: Two New Views 9/30/2011

ceda-di Documentation

python-omgeo Documentation

Acquiring and Processing NREL Wind Prospector Data. Steven Wallace, Old Saw Consulting, 27 Sep 2016

pydrill Documentation

Release Fulfil.IO Inc.

Recorded Data / Current Readings (XML Format) Specifications. Ver 1.25

REST API FOR CREATING REAL TIME REMOTE LUNCH INVITATIONS

IoT Relay Documentation

03-Creating_NetCDF. Stephen Pascoe. 1 Creating NetCDF data in Python. 1.1 NetCDF Model Revision. 1.2 Creating/Opening/Closing a netcdf file

Mobile Phone Monitoring System For Android Operating System

sanction Documentation

Google Earth. April CSCI Intro. to Comp. for the Humanities and Social Sciences 1

RockSTAR XML API. A quick-start, example-led guide to the RockSTAR XML API. !! Version Updated 14th February 2014

Solar Panel Estimator User Guide

Google Maps Manually Place Marker On Click V3 Remove

python-tds Documentation

Help Documentation. Copyright 2007 WebAssist.com Corporation All rights reserved.

processing data from the web

stix-validator Documentation

picrawler Documentation

Transcription:

python-gmaps Documentation Release 0.0.2 Michał Jaworski February 22, 2017

Contents 1 gmaps package 3 1.1 Submodules............................................... 3 1.2 gmaps.client module........................................... 3 1.3 gmaps.directions module......................................... 3 1.4 gmaps.distance_matrix module..................................... 4 1.5 gmaps.elevation module......................................... 4 1.6 gmaps.errors module........................................... 5 1.7 gmaps.geocoding module........................................ 5 1.8 gmaps.status module........................................... 6 1.9 gmaps.timezone module......................................... 6 1.10 Module contents............................................. 6 2 Indices and tables 7 Python Module Index 9 i

ii

python-gmaps Documentation, Release 0.0.2 API: Contents 1

python-gmaps Documentation, Release 0.0.2 2 Contents

CHAPTER 1 gmaps package Submodules gmaps.client module class gmaps.client.client(sensor=false, api_key=none, use_https=true) Bases: object Base class for Google Maps API endpoints Parameters sensor boolean value indicating if application is using sensor (such as a GPS locator) to determine the user s location. api_key google business API key use_https boolean indicating if https should be use to make requests Note: Google API won t allow you to make plain http requests with API key. If you would like to use api_key you should use https too. BASE_API_HTTPS_URL = https://maps.googleapis.com/maps/api/ BASE_API_HTTP_URL = http://maps.googleapis.com/maps/api/ static assume_latlon(location) static assume_latlon_or_address(location) gmaps.directions module class gmaps.directions.directions(sensor=false, api_key=none, use_https=true) Bases: gmaps.client.client DIRECTIONS_URL = directions/ directions(origin, destination, mode=none, alternatives=none, waypoints=none, optimize_waypoints=false, avoid=none, language=none, units=none, region=none, departure_time=none, arrival_time=none, sensor=none) Get directions between locations 3

python-gmaps Documentation, Release 0.0.2 Parameters origin Origin location - string address; (latitude, longitude) two-tuple, dict with ( lat, lon ) keys or object with (lat, lon) attributes destination Destination location - type same as origin mode Travel mode as string, defaults to driving. See google docs details alternatives True if provide it has to return more then one route alternative waypoints Iterable with set of intermediate stops, like ( Munich, Dallas ) See google docs details optimize_waypoints if true will attempt to re-order supplied waypoints to minimize overall cost of the route. If waypoints are optimized, the route returned will show the optimized order under waypoint_order. See google docs details avoid Iterable with set of restrictions, like ( tolls, highways ). For full list refer to google docs details language The language in which to return results. See list of supported languages units Unit system for result. Defaults to unit system of origin s country. See google docs details region The region code. Affects geocoding of origin and destination (see gmaps.geocoding.geocode region parameter) departure_time Desired time of departure as seconds since midnight, January 1, 1970 UTC arrival_time Desired time of arrival for transit directions as seconds since midnight, January 1, 1970 UTC. gmaps.distance_matrix module gmaps.elevation module class gmaps.elevation.elevation(sensor=false, api_key=none, use_https=true) Bases: gmaps.client.client ELEVATION_URL = elevation/ elevation(locations=none, samples=none, sensor=false) Parameters Returns locations list of lat/lon positions samples specifies the number of sample points along a path for which to return elevation data. The samples parameter divides the given path into an ordered set of equidistant points along the path. If not set then the result will be elevation for every point in list of locations. 4 Chapter 1. gmaps package

python-gmaps Documentation, Release 0.0.2 gmaps.errors module exception gmaps.errors.gmapexception Bases: exceptions.exception Base exception for all python-gmap exceptions exception gmaps.errors.invalidrequest Bases: gmaps.errors.gmapexception Raised when request to Google API was invalid exception gmaps.errors.noresults Bases: gmaps.errors.gmapexception Raised when api returned no results exception gmaps.errors.ratelimitexceeded Bases: gmaps.errors.gmapexception Raised when rate limit to API endpoint was exceeded exception gmaps.errors.requestdenied Bases: gmaps.errors.gmapexception Raised when request to API was denied gmaps.geocoding module class gmaps.geocoding.geocoding(sensor=false, api_key=none, use_https=true) Bases: gmaps.client.client GEOCODE_URL = geocode/ geocode(address=none, components=none, region=none, language=none, bounds=none, sensor=none) Geocode given address. Geocoder can queried using address and/or components. Components when used with address will restrict your query to specific area. When used without address they act like more precise query. For full details see Google docs. Parameters address address string components ditc of components region region code specified as a cctld ( top-level domain ) two-character value, influences but not restricts query result language the language in which to return results. For full list of laguages go to Google Maps API docs bounds two-tuple of (latitude, longitude) pairs of bounding box. Influences but not restricts result (same as region parameter) sensor override default client sensor parameter reverse(lat, lon, result_type=none, location_type=none, language=none, sensor=none) Reverse geocode with given latitude and longitude. Parameters 1.6. gmaps.errors module 5

python-gmaps Documentation, Release 0.0.2 lat latitude of queried point lon longitude of queried point result_type list of result_type for filtered search. Accepted values: https://developers.google.com/maps/documentation/geocoding/intro#types Important: this feature may require using API key to work. location_type list of location_type for filtered search. language the language in which to return results. For full list of laguages go to Google Maps API docs sensor override default client sensor parameter Note: Google API allows to specify both latlng and address params but it makes no sense and would not reverse geocode your query, so here geocoding and reverse geocoding are separated gmaps.status module gmaps.timezone module class gmaps.timezone.timezone(sensor=false, api_key=none, use_https=true) Bases: gmaps.client.client TIMEZONE_URL = timezone/ timezone(lat, lon, datetime, language=none, sensor=none) Get time offset data for given location. Parameters lat Latitude of queried point lon Longitude of queried point language The language in which to return results. For full list of laguages go to Google Maps API docs datetime (datetime.datetime) Desired time. The Time Zone API uses the timestamp to determine whether or not Daylight Savings should be applied. datetime should be timezone aware. If it isn t the UTC timezone is assumed. sensor Override default client sensor parameter gmaps.timezone.total_seconds(td) Take a timedelta and return the number of seconds it represents gmaps.timezone.unixtimestamp(datetime) Get unix time stamp from that given datetime. If datetime is not tzaware then it s assumed that it is UTC Module contents repo on github 6 Chapter 1. gmaps package

CHAPTER 2 Indices and tables genindex modindex search 7

python-gmaps Documentation, Release 0.0.2 8 Chapter 2. Indices and tables

Python Module Index g gmaps, 6 gmaps.client, 3 gmaps.directions, 3 gmaps.distance_matrix, 4 gmaps.elevation, 4 gmaps.errors, 5 gmaps.geocoding, 5 gmaps.status, 6 gmaps.timezone, 6 9

python-gmaps Documentation, Release 0.0.2 10 Python Module Index

Index A assume_latlon() (gmaps.client.client static method), 3 assume_latlon_or_address() (gmaps.client.client static method), 3 B BASE_API_HTTP_URL (gmaps.client.client attribute), 3 BASE_API_HTTPS_URL (gmaps.client.client attribute), 3 C Client (class in gmaps.client), 3 D Directions (class in gmaps.directions), 3 directions() (gmaps.directions.directions method), 3 DIRECTIONS_URL (gmaps.directions.directions attribute), 3 E Elevation (class in gmaps.elevation), 4 elevation() (gmaps.elevation.elevation method), 4 ELEVATION_URL (gmaps.elevation.elevation attribute), 4 G geocode() (gmaps.geocoding.geocoding method), 5 GEOCODE_URL (gmaps.geocoding.geocoding attribute), 5 Geocoding (class in gmaps.geocoding), 5 GmapException, 5 gmaps (module), 6 gmaps.client (module), 3 gmaps.directions (module), 3 gmaps.distance_matrix (module), 4 gmaps.elevation (module), 4 gmaps.errors (module), 5 gmaps.geocoding (module), 5 gmaps.status (module), 6 gmaps.timezone (module), 6 I InvalidRequest, 5 N NoResults, 5 R RateLimitExceeded, 5 RequestDenied, 5 reverse() (gmaps.geocoding.geocoding method), 5 T Timezone (class in gmaps.timezone), 6 timezone() (gmaps.timezone.timezone method), 6 TIMEZONE_URL (gmaps.timezone.timezone attribute), 6 total_seconds() (in module gmaps.timezone), 6 U unixtimestamp() (in module gmaps.timezone), 6 11