peabiru (Python) 
Multimodal routing on OpenStreetMap street networks and GTFS public transport: travel-time matrices, accessibility, and minute-by-minute (expanded) and arrival-time matrices, by walking, cycling, driving and public transport.
The routing engine is written in Rust and runs inside the Python process:
no Java is needed, the network is built once in memory and reused by every
call, and the results are pandas.DataFrames. The same Rust core powers
the R package of the same name.
import datetime as dt
import peabiru
network = peabiru.build_network(peabiru.sample_data_path())
points = peabiru.sample_points() # id, lon, lat, opportunities
ttm = peabiru.travel_time_matrix(
network, points, points,
mode=["WALK", "TRANSIT"],
departure_datetime=dt.datetime(2019, 5, 13, 14, 0),
percentiles=[25, 50, 75],
seed=42,
)
access = peabiru.accessibility(
network, points, points,
opportunities_colnames="jobs",
mode="BICYCLE",
decay_function="logistic",
cutoffs=[15, 30],
decay_value=5,
)
| Function | What it computes |
|---|---|
build_network(data_path) |
a network from a directory with one .pbf and any GTFS .zip |
travel_time_matrix(...) |
travel times between every origin and destination |
accessibility(...) |
cumulative or decay-weighted access to opportunities |
expanded_travel_time_matrix(...) |
travel times minute by minute, with a breakdown of each trip |
arrival_travel_time_matrix(...) |
the latest trip that arrives by a given time |
Points are pandas.DataFrames with id, lon and lat (or, with
geopandas installed, a GeoDataFrame of points in EPSG:4326); results are
pandas.DataFrames in long format. What peabiru does not support
yet (transit with bicycle or car access, fares, scenarios,
elevation, ...) raises peabiru.UnsupportedError; nothing is silently
ignored.
Install
pip install peabiru
pip install "peabiru[geo]" # with geopandas
Requires Python 3.9 or later and pandas. The release builds wheels for Linux with glibc (x86_64 and aarch64), macOS (arm64 and x86_64) and Windows (x64), one wheel per platform for every Python from 3.9. There are no wheels for Linux with musl (Alpine) or for Windows on Arm: there pip builds the package from the source distribution, which needs a Rust toolchain (rustc 1.81 or later).
From a clone of the repository (needs a Rust toolchain):
cd python
maturin develop --uv --release
Development
cd python
uv venv && uv pip install pandas pytest geopandas
maturin develop --uv
.venv/bin/python -m pytest # tests, doc examples, doctests
uv pip install "mkdocs>=1.6" "mkdocs-material>=9.5" "mkdocstrings[python]>=0.26"
.venv/bin/mkdocs build --strict # documentation site in site/
Compatibility with r5r
The functions, their arguments, defaults and results follow the R package r5r 2.5.0: the engine is a Rust port of R5 7.6, the engine r5r drives, and is checked against r5r call for call, with identical results, including the last bit of accessibility values. The comparison (needs R with r5r 2.5.0 and a JDK 21) runs from the repository root:
JAVA_HOME=/path/to/jdk21 python/.venv/bin/python bench/compare/py_parity.py poa spo
Sample data
peabiru.sample_data_path() is a small network cut from r5r's Sao Paulo
sample data. Its spo_osm.pbf contains map data (c) OpenStreetMap
contributors, available under the
Open Database License, and
spo_gtfs.zip is the SPTrans GTFS feed shipped with r5r, without
shapes.txt. Their sources are detailed in LICENSE-THIRD-PARTY.
License
MIT. peabiru ports R5 (MIT, Conveyal) and parts of Apache Commons Math
(Apache-2.0); their notices and licence texts are in LICENSE-THIRD-PARTY,
shipped with the package. The compiled extension module also contains code
from the Rust crates pyo3, miniz_oxide and others (MIT, Apache-2.0 and
similar licences); their licences are in LICENSE-RUST-CRATES, also shipped
with the package.
Metadata
Release files for peabiru 0.0.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 |
|---|---|---|---|---|
| peabiru-0.0.1.tar.gz | 483.6 kB | With provenance | Details for peabiru-0.0.1.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| peabiru-0.0.1-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details for peabiru-0.0.1-cp39-abi3-win_amd64.whl |
| peabiru-0.0.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details for peabiru-0.0.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| peabiru-0.0.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details for peabiru-0.0.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
| peabiru-0.0.1-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details for peabiru-0.0.1-cp39-abi3-macosx_11_0_arm64.whl |
| peabiru-0.0.1-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details for peabiru-0.0.1-cp39-abi3-macosx_10_12_x86_64.whl |
Total release size: 5.5 MB
Release files / peabiru-0.0.1.tar.gz
| Download URL | peabiru-0.0.1.tar.gz |
|---|---|
| Size | 483.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ec88d7026fba0364a53df2d3d9a1d45fc31e5525ee61c9923bb41e4c0141507
|
|
BLAKE2b-256 checksum How to use checksums |
faaa224561d9b9347337d4fc6304de0aee1251d5b74b8a86c5b65b4eced7674c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 11, 2026.
Transparency logRelease files / peabiru-0.0.1-cp39-abi3-win_amd64.whl
| Download URL | peabiru-0.0.1-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 945.3 kB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
7085ff9ace1665d4071006e28d571a359a3a9cb1a8934f7b14c26964193c74f6
|
|
BLAKE2b-256 checksum How to use checksums |
4a0e7f710c5677040245a9d00753089bb4897ca5d3c21b4f3ce970b5f36090fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 11, 2026.
Transparency logRelease files / peabiru-0.0.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | peabiru-0.0.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
11ed2421fdfa8386850e7e374573994f826054820a778024239f30bada3a6cb4
|
|
BLAKE2b-256 checksum How to use checksums |
dd2797bf6e974e38a560188715a3005c9790914dd7f147e9003d9b39716ed091
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 11, 2026.
Transparency logRelease files / peabiru-0.0.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | peabiru-0.0.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
e507d090c45b81eb4da2c7bf06bdd1bcd98ad4174afa3c1bee8703853ff4ff20
|
|
BLAKE2b-256 checksum How to use checksums |
fcf253e21721eaa970ae4f708899a943490c27d9300ac3e82e1118b521489a94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 11, 2026.
Transparency logRelease files / peabiru-0.0.1-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | peabiru-0.0.1-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 966.0 kB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
53966e8485cc41ae422ff8481af1eef62ab8c4c4863f6b34b775487c278d361e
|
|
BLAKE2b-256 checksum How to use checksums |
3b5923c797494db98bfde267c30a800ff820298b88091f57fd8167fb03422f44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 11, 2026.
Transparency logRelease files / peabiru-0.0.1-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | peabiru-0.0.1-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
e9fbd73ec8c97227ffe35041d38cc1224b1a8546a9c12ce3c2b08198f1cf5081
|
|
BLAKE2b-256 checksum How to use checksums |
cc40cd8244d66c7b80a15e51ed57ad0b41b26d8c1c17233b0cc5e546290d8d79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 11, 2026.
Transparency logSecurity for peabiru 0.0.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.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for peabiru-0.0.1.tar.gz
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 11, 2026.
Transparency logA 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.