Skip to main content

Python client for OSRM api

Project description

py-osrm-client

build

Simple Python client for OSRM api.

Usage

Async client:

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)

Sync client:

from osrm import OsrmAsyncClient

async def example():
    with OsrmClient() as osrm:
        coordinates = [(0.1, 0.2), (0.3, 0.4)]
        trip = osrm.trip(coordinates)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py-osrm-client-1.0.1.tar.gz (12.9 kB view hashes)

Uploaded Source

Built Distribution

py_osrm_client-1.0.1-py3-none-any.whl (14.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page