A Python client for OSRM API
Running the test suite
python setup.py test
Requires
requests
aiohttp
Usage
With using requests
import osrm
client = osrm.Client(host='http://localhost:5000')
response = client.route(
coordinates=[[-74.0056, 40.6197], [-74.0034, 40.6333]],
overview=osrm.overview.full)
print(response)
With using aiohttp
import asyncio
import osrm
loop = asyncio.get_event_loop()
async def request():
client = osrm.AioHTTPClient(host='http://localhost:5000')
response = await client.route(
coordinates=[[-74.0056, 40.6197], [-74.0034, 40.6333]],
overview=osrm.overview.full)
print(response)
await client.close()
loop.run_until_complete(request())
Release files for osrm-py 0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| osrm-py-0.5.tar.gz | 6.5 kB | Details |
Release files / osrm-py-0.5.tar.gz
| Download URL | osrm-py-0.5.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ae0fe4c943849e1b8ef0f99e768ffcd18787b4f2dced9fd0642998fad3f5ac6
|
|
BLAKE2b-256 checksum How to use checksums |
7c402d6d0245df9b528f22fb9bcabc6ae656dbde8e33036f1b9328852c746880
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
|