Skip to main content

High-level bindings to the Valhalla C++ library

Project description

Valhalla for Python

Master Push

This spin-off project simply offers packaged Python bindings to the fantastic Valhalla project.

Over time we will very likely deviate from Valhalla's own Python binding code to allow usages outside the scope of the core project. Refer to our release pattern to learn more about the versioning of this project.

Note, the performance boost using these bindings compared to requesting an HTTP service is tremendous: on 500 random routes in Berlin, the bindings take 27 secs while HTTP on localhost takes 127 secs.

Installation

We distribute all 4 currently developed CPython versions as binary wheels for Win64, MacOS (Intel) and x86_64 Linux distributions with glibc>=2.24 (most modern systems, see PEP 600). We do not offer a source distribution on PyPI. Please contact us on enquiry@gis-ops.com if you need support building the bindings for your platform/distribution.

pip install pyvalhalla

Note, to install from PyPI as a Linux user you must have pip version 20.3 or greater installed.

Usage

Find a more extended notebook in ./examples, e.g. how to use the actor.

Before using the Python bindings you need to have access to a routable Valhalla graph. Either install Valhalla from source and built the graph from OSM compatible data or use our Valhalla docker image for a painless experience.

Once you have created a graph locally, you can use it like this:

from valhalla import Actor, get_config, get_help

# generate configuration
config = get_config(tile_extract='path/to/extract.tar', verbose=True)

# print the help for specific config items (has the same structure as the output of get_config()
print(get_help()["service_limits"]["auto"]["max_distance"])

# instantiate Actor to load graph and call actions
actor = Actor(config)
route = actor.route({"locations": [...]})

License

pyvalhalla is licensed with GPLv2, see LICENSE.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pyvalhalla-3.0.2-cp310-cp310-win_amd64.whl (2.9 MB view details)

Uploaded CPython 3.10 Windows x86-64

pyvalhalla-3.0.2-cp310-cp310-manylinux_2_24_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.24+ x86-64

pyvalhalla-3.0.2-cp310-cp310-macosx_10_9_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

pyvalhalla-3.0.2-cp39-cp39-win_amd64.whl (2.9 MB view details)

Uploaded CPython 3.9 Windows x86-64

pyvalhalla-3.0.2-cp39-cp39-manylinux_2_24_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.24+ x86-64

pyvalhalla-3.0.2-cp39-cp39-macosx_10_9_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

pyvalhalla-3.0.2-cp38-cp38-win_amd64.whl (2.9 MB view details)

Uploaded CPython 3.8 Windows x86-64

pyvalhalla-3.0.2-cp38-cp38-manylinux_2_24_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.24+ x86-64

pyvalhalla-3.0.2-cp38-cp38-macosx_10_9_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

pyvalhalla-3.0.2-cp37-cp37m-win_amd64.whl (3.0 MB view details)

Uploaded CPython 3.7m Windows x86-64

pyvalhalla-3.0.2-cp37-cp37m-manylinux_2_24_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.24+ x86-64

pyvalhalla-3.0.2-cp37-cp37m-macosx_10_9_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

Details for the file pyvalhalla-3.0.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pyvalhalla-3.0.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for pyvalhalla-3.0.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 fd812794ad4d19112960bbe396fa178c79e9ea6fdde0126712e60fabf92ae65f
MD5 3c06cfd40a36c2f2e65f0dffe0bc5a58
BLAKE2b-256 3eacc5c17926e96f4835a769de0e66672c9c6537b09c99f1979e7c766be0a281

See more details on using hashes here.

File details

Details for the file pyvalhalla-3.0.2-cp310-cp310-manylinux_2_24_x86_64.whl.

File metadata

  • Download URL: pyvalhalla-3.0.2-cp310-cp310-manylinux_2_24_x86_64.whl
  • Upload date:
  • Size: 8.2 MB
  • Tags: CPython 3.10, manylinux: glibc 2.24+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for pyvalhalla-3.0.2-cp310-cp310-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 2cf32cdfb6014054628ddf24fe97da00fa125a541ae79750fdb76531680f9cd9
MD5 0331942f22ebd6abf95399774d29f8e9
BLAKE2b-256 15d0fc76ea5a04f83ee1ea3ae7ee1724cb7e8e41137e7eb6b3cfdff4c3a73e0f

See more details on using hashes here.

File details

Details for the file pyvalhalla-3.0.2-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pyvalhalla-3.0.2-cp310-cp310-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.10, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for pyvalhalla-3.0.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ee6690741f17701cd9121e4adf2a81c201e82e5fac2d7bf659e98f979107e52d
MD5 48491839b4b232d048f70e8beb4d0ffe
BLAKE2b-256 504c3b80c18f9ca5e97da32fb202f0f4c5e560b579392b700ccd29fdf9699069

See more details on using hashes here.

File details

Details for the file pyvalhalla-3.0.2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pyvalhalla-3.0.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for pyvalhalla-3.0.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0ff7ed2d88825898ccefe93101370e9244803e2fcfa5a957dfc6112a93a446e4
MD5 4e9ea6eabc4e552dbb790c785eb36d97
BLAKE2b-256 3fc160a178a45ef993945a51a9f5cfd2bb77bc34531f6dd845892f1864405ffc

See more details on using hashes here.

File details

Details for the file pyvalhalla-3.0.2-cp39-cp39-manylinux_2_24_x86_64.whl.

File metadata

  • Download URL: pyvalhalla-3.0.2-cp39-cp39-manylinux_2_24_x86_64.whl
  • Upload date:
  • Size: 8.2 MB
  • Tags: CPython 3.9, manylinux: glibc 2.24+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for pyvalhalla-3.0.2-cp39-cp39-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 405edbb443499036cc3e013a8385e1307e29f18f17388c670a52a7d10cf323ff
MD5 b72b17533f7a762e7efb20a4f3de892d
BLAKE2b-256 2851ff7aeb0dca5412d1fa7f0cf6e2fa03f0f3a60020e3ee981ed5588f8f84e4

See more details on using hashes here.

File details

Details for the file pyvalhalla-3.0.2-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pyvalhalla-3.0.2-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for pyvalhalla-3.0.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d446d791a00c7478c62caf9b658c744442217137d78e8cc7f2280c960f257ff7
MD5 1bf38a95ef360597962f6c88d942c98f
BLAKE2b-256 d485fc7ec4a4d8c8fe010b4910d7d7336171e89c5ad2190ec2fdfa673f1d6624

See more details on using hashes here.

File details

Details for the file pyvalhalla-3.0.2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pyvalhalla-3.0.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for pyvalhalla-3.0.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 85ba2621ae79d543d7af5a8c9aa275e3a4723e042f246d1696ca423eaac580a7
MD5 17cbfe8b3d5ecec0754882f3f84f79ab
BLAKE2b-256 31396ff1cb8ec5a43ef75d2c9bd68d1ccb326e3b6cc3be424ca66d749457cc1b

See more details on using hashes here.

File details

Details for the file pyvalhalla-3.0.2-cp38-cp38-manylinux_2_24_x86_64.whl.

File metadata

  • Download URL: pyvalhalla-3.0.2-cp38-cp38-manylinux_2_24_x86_64.whl
  • Upload date:
  • Size: 8.2 MB
  • Tags: CPython 3.8, manylinux: glibc 2.24+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for pyvalhalla-3.0.2-cp38-cp38-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 d433be87a1341d53f74f0aab573c4c79ef5c850d0c43e7367b1d66c314dad835
MD5 469c07837fe299246e0a50232bd586a3
BLAKE2b-256 e399d9aa835052260e1513fccf0e22eb888601168fc66d8ac63cfe19739c0b02

See more details on using hashes here.

File details

Details for the file pyvalhalla-3.0.2-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pyvalhalla-3.0.2-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for pyvalhalla-3.0.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 870eb03a6c5311c001e932b49451199493ef476e0715c9aa0837b38662e0719b
MD5 01ce654609099412d95d2af6d5a6417d
BLAKE2b-256 03fbf15bafe9279f40a802be9a64791384256b290e05a3f544b704de3cc4f928

See more details on using hashes here.

File details

Details for the file pyvalhalla-3.0.2-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pyvalhalla-3.0.2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for pyvalhalla-3.0.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 e01471af28328be6efd14f147eb270cb8837bdd87638c6d17f22112e50f88e64
MD5 a33a30395ad1ff8e3ce676168054c185
BLAKE2b-256 e51563d6236237b60a597829e7e09a85455b2f07d7148e81732f3e811e0284df

See more details on using hashes here.

File details

Details for the file pyvalhalla-3.0.2-cp37-cp37m-manylinux_2_24_x86_64.whl.

File metadata

  • Download URL: pyvalhalla-3.0.2-cp37-cp37m-manylinux_2_24_x86_64.whl
  • Upload date:
  • Size: 8.2 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.24+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for pyvalhalla-3.0.2-cp37-cp37m-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 fffc86531bb2f6938e52374118e767680552b5187366d3269a0f82f98a0c3142
MD5 52a15ad7118deda06285f18750e6f973
BLAKE2b-256 b2ce927fc7939bbc908654c874f7ca0603f35ee85d1eec4b168dde1f1ffc5e3f

See more details on using hashes here.

File details

Details for the file pyvalhalla-3.0.2-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pyvalhalla-3.0.2-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for pyvalhalla-3.0.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0cd31e3f1098885163f0a44e447b766cfc7e679f2400f475682f55159afbd93e
MD5 981e8e9b3853e471077bb8ad41c66ef8
BLAKE2b-256 6935250cc86e791bb38675b0f818e0837fcfbc2b7409b9bdf993ef89945f156b

See more details on using hashes here.

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