Introduction
This lib allows you to query the google direction api from your python code, i.e. without a browser. The parser will give you a dict of anything that google knows about the direction: Distance, waypoints, corrected addresses and much more.
Although you have direct access to the parser output, you may also use the convenient api as seen in the Usage part below.
Copyright / License
GPLv3
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Usage
>>> from google.directions import GoogleDirections
>>> gd = GoogleDirections('your-google-directions-key')
>>> res = gd.query('berlin','paris')
>>> res.distance
1055351
You also have access to the raw parser data:
>>> res.result["Directions"]["Duration"]
{u'seconds': 34329, u'html': u'9 hours 32 mins'}
Have fun!
Contribution
If you extend the gdapi, I’d love to get your extensions. Just mail me the code and I’ll make a release. See below for the mail address.
Changelog
0.1 - Unreleased
0.2* - JS Parsers, DOM Parser fully working, Google API is working, but minimal.
0.2.1 - Fixed bad description and README.
0.2.2 - Fixed missing README.txt
0.2.3 - Allowed tab as space too
0.3 - splitted of the json parser as d9t.json. Now with tests and a better understanding of json.
Initial release
Metadata
Release files for google.directions 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| google.directions-0.3.tar.gz | 17.1 kB | Without provenance | Details for google.directions-0.3.tar.gz |
Release files / google.directions-0.3.tar.gz
| Download URL | google.directions-0.3.tar.gz |
|---|---|
| Size | 17.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
55a8cdbfe297086a96d89d3e47783def9f4cf866c41c08d48d196d00897c469d
|
|
BLAKE2b-256 checksum How to use checksums |
f84eea1464dfa51c3ba746178b7b5012f70d9616aa87928775377d2500b1369a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for google.directions 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.