py-osrm-backend
A Python implementation of core OSRM (Open Source Routing Machine) functionality.
Installation
pip install py-osrm-backend
Features
- OSM Parsing: Parse
.osmXML files to extract nodes and ways - Graph Building: Build a routable graph with haversine distance weights
- Routing: Dijkstra's algorithm for shortest path computation
- API Server: Flask-based REST API compatible with OSRM-like endpoints
Quick Start
from osrm.extractor.graph_builder import GraphBuilder
from osrm.engine.dijkstra import DijkstraEngine
# Build graph from OSM
builder = GraphBuilder()
graph = builder.build_graph("your_map.osm")
# Route
engine = DijkstraEngine(graph)
distance, path = engine.shortest_path(start_id, end_id)
print(f"Distance: {distance} km, Path: {path}")
Run Tests
python -m unittest discover -s tests -v
License
MIT
Metadata
Release files for py-osrm-backend 0.1.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 | Provenance | Actions |
|---|---|---|---|---|
| py_osrm_backend-0.1.1.tar.gz | 14.3 kB | Without provenance | Details for py_osrm_backend-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_osrm_backend-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for py_osrm_backend-0.1.1-py3-none-any.whl |
Total release size: 27.6 kB
Release files / py_osrm_backend-0.1.1.tar.gz
| Download URL | py_osrm_backend-0.1.1.tar.gz |
|---|---|
| Size | 14.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28fad56c44ebc1895bb1fd5b1c8ed6c250ef21db133ed9060d68a51b5b037600
|
|
BLAKE2b-256 checksum How to use checksums |
92c5b6d473e440ba612a89c0a694c70fa7a90bfc3e49a5d5b7213df337671ee8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.8
|
Release files / py_osrm_backend-0.1.1-py3-none-any.whl
| Download URL | py_osrm_backend-0.1.1-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ee9d92bd01aba3ef1d9920d92fec7bb093d7e9b560f214cbab9a3fc80e173ca2
|
|
BLAKE2b-256 checksum How to use checksums |
61db036f012a71c434612a50cac000f030ca93fad56fc32d5eeb3b82e6a97026
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.8
|
Security for py-osrm-backend 0.1.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.