Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hzlmn/aiogmaps
asyncio google maps api client
https://github.com/hzlmn/aiogmaps
aiohttp asyncio google-maps google-maps-api python
Last synced: 2 months ago
JSON representation
asyncio google maps api client
- Host: GitHub
- URL: https://github.com/hzlmn/aiogmaps
- Owner: hzlmn
- License: mit
- Created: 2018-03-07T19:50:18.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-02-26T02:13:58.000Z (almost 4 years ago)
- Last Synced: 2024-10-20T07:46:45.058Z (3 months ago)
- Topics: aiohttp, asyncio, google-maps, google-maps-api, python
- Language: Python
- Homepage:
- Size: 49.8 KB
- Stars: 12
- Watchers: 5
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# aiogmaps
[![Downloads](https://pepy.tech/badge/aiogmaps/month)](https://pepy.tech/project/aiogmaps/month)
[![Build Status](https://travis-ci.org/hzlmn/aiogmaps.svg?branch=master)](https://travis-ci.org/hzlmn/aiogmaps)Asyncio client library for Google Maps API Web Services
## Requirements
- [googlemaps](https://github.com/googlemaps/google-maps-services-python) >= 3.0
## Getting Started
```sh
pip install aiogmaps
```## Usage
### API Key
```python
import asynciofrom aiogmaps import Client
async def main(loop):
api_key = 'xxx'
async with Client(api_key, loop=loop) as client:
resp = await client.place(place_id='ChIJN1t_tDeuEmsRUsoyG83frY4')
print(resp)if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main(loop))```
### Client ID & Secret
```python
import asynciofrom aiogmaps import Client
async def main(loop):
client_id = 'xxx'
client_secret = 'xxx'
async with Client(client_id=client_id, client_secret=client_secret, loop=loop) as client:
resp = await client.place(place_id='ChIJN1t_tDeuEmsRUsoyG83frY4')
print(resp)if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main(loop))```
## Documentation
This library works as a wrapper around official googlemaps library.
For detailed API reference
- https://developers.google.com/maps/documentation/
- https://googlemaps.github.io/google-maps-services-python/docs/