py-osrm-client
Simple and typed Python client for OSRM api.
Requirements
Installation
pip install py-osrm-client
Usage
Async client:
import asyncio
from osrm import OsrmAsyncClient
async def example():
async with OsrmAsyncClient() as osrm:
coordinates = [(0.1, 0.2), (0.3, 0.4)]
trip = await osrm.trip(coordinates)
print(trip)
asyncio.run(example())
Sync client:
from osrm import OsrmClient
with OsrmClient() as osrm:
coordinates = [(0.1, 0.2), (0.3, 0.4)]
trip = osrm.trip(coordinates)
print(trip)
By default the clients will refer to the OSRM demo server at https://router.project-osrm.org. To use another OSRM server:
async with OsrmAsyncClient(base_url='https://my-custom-osrm-server.com') as osrm:
# use client
Refer to OSRM api documentation for more details about OSRM services and options.
Metadata
Release files for py-osrm-client 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| py_osrm_client-1.2.1.tar.gz | 10.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| py_osrm_client-1.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.0 kB
Release files / py_osrm_client-1.2.1.tar.gz
| Download URL | py_osrm_client-1.2.1.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d704f511110520f2c0acc69fd6b4931f47ba6d888ae57402733a0dff4394b779
|
|
BLAKE2b-256 checksum How to use checksums |
24aff5a16dfe59cff290fbec76d9183002cf632869cf86cc7ddfa86b5899c84c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2025.
Transparency logRelease files / py_osrm_client-1.2.1-py3-none-any.whl
| Download URL | py_osrm_client-1.2.1-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b01265b1df19e0781a557331c37050d8a3b66904c4672bf2887d4b856429e84f
|
|
BLAKE2b-256 checksum How to use checksums |
7c829627fea54190574625333d81223a52611c11e47b427aacc10482ea9075d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2025.
Transparency log