transitio: Transit feeds in and out, ready for routing
Find the right public transport feeds for any city, validated and ready for routing or editing.
transitio is a Python library that helps you to find public transport feeds
serving a given city and prepares them for routing. transitio's feed index
catalogues the world's public transport feeds in GTFS format and the places
they serve (currently listing approximately 150,000 places). The General
Transit Feed Specification (GTFS) is the standard format for public transport
timetables, used by thousands of transport authorities across the world. With
transitio, you can get recommendations on which feeds to use for a given
city (and time) and an explanation of why certain feeds should be left out.
transitio then helps you to download the recommended feeds, crop them to the
given area and validate them to avoid using broken or defective feeds. With
transitio, you can also download
OpenStreetMap data for the same area (using
pyrosm under the hood) if you want to
do multimodal routing that combines public transport and walking.
Status: early development.
Installation
pip install transitio
Prebuilt Python packages (wheels) are available for Linux, macOS and Windows.
Building from source with pip install . requires a Rust toolchain. To show
the download progress bars as widgets in Jupyter, install ipywidgets with
pip install "transitio[notebook]". result.to_cafein() also requires
cafein; install it with
pip install cafein.
Example
import transitio
transitio.index.refresh() # once: install the feed index
turku = transitio.place("Turku")
rec = turku.recommend() # which feeds to use, and why
result = transitio.fetch(feeds=rec) # download, crop and validate
result.paths # the feed files
result.osm_pbf # the OpenStreetMap extract
network = result.to_cafein() # a network to route on (needs cafein)
What can you do with transitio?
- Find places and their feeds. Look up a city, metro area, region or country by name and list the feeds that serve it, from local to international (Finding places).
- Choose the feeds to use.
recommend()considers the feeds that serve a place, selects which to use and explains why it leaves the others out (Choosing feeds). - Fetch the data. Download the feeds for a place, a box or any polygon and crop them to that area. Also download an OpenStreetMap extract of the area (Fetching data).
- Reuse downloads. Every feed that
fetchdownloads is kept in a cache. This lets the same analysis use the same feeds again, even offline (The download cache). - Check, repair and edit feeds. Validate any GTFS feed with the notice codes of the canonical GTFS validator. Repair defects that can be fixed without changing the trips riders see. Edit a feed with undo and redo (Working with a GTFS feed).
- Crop and merge feeds. Cut a feed to an area or a date range, merge several feeds into one, or replace a feed's broken trips with those of another (Cropping and merging feeds).
- Build scenario feeds. Turn routes drawn in a GIS tool and their headways (how often they run) into a GTFS feed (Building scenario feeds).
- Search the catalogues. Query the Mobility Database and download OpenStreetMap extracts directly (Catalogues and OSM extracts).
- Draw missing route shapes.
infer_shapesdraws the shapes a feed lacks from OpenStreetMap (below).
Drawing missing route shapes
Many feeds do not have shapes.txt, so their routes appear as straight lines
between stops. infer_shapes draws route shapes from an OpenStreetMap
extract. It follows OpenStreetMap route relations where they exist.
Otherwise, it matches each route's stops to the tram, rail or road network.
report = transitio.infer_shapes(
"feed.zip", "shaped.zip", pbf, strictness="strict"
)
report["written"] # shapes written
report["shapes"] # per shape: method, matched OSM relation, score
report["skipped"] # per refused pattern: the step that refused it
strictness sets how much guessing to accept. "strict" (the default)
writes only unambiguous matches. "relaxed" and "permissive" write more
shapes with less certainty. Before infer_shapes writes a shape, the stops
in the pattern must lie along it in order. When the shapes of Helsinki's tram
feed were withheld, the three levels produced these results
(scripts/validate_shapes.py):
| level | shapes written | median length error | worst offset |
|---|---|---|---|
| strict | 35/80 | 0.9% | 42 m |
| relaxed | 40/80 | 0.9% | 34 m |
| permissive | 43/80 | 0.9% | 184 m |
Helsinki's OpenStreetMap data is unusually complete. Elsewhere, expect fewer and less accurate shapes.
Documentation
The documentation is available at https://transitio.readthedocs.io and
includes the Quickstart, the tutorials and the API reference. To build it
locally, install transitio and the Sphinx toolchain:
pip install . -r docs/requirements.txt
sphinx-build -b html docs docs/_build/html
The feed index is built in a separate repository, transitio-dev/transitio-index.
License
MIT
Metadata
Release files for transitio 0.28.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| transitio-0.28.0.tar.gz | 421.3 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| transitio-0.28.0-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| transitio-0.28.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| transitio-0.28.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| transitio-0.28.0-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
| transitio-0.28.0-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 9.2 MB
Release files / transitio-0.28.0.tar.gz
| Download URL | transitio-0.28.0.tar.gz |
|---|---|
| Size | 421.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c5633dfcd5113e660a0c93d71a2e68e16b58d891bf93b9f34d05c805460b084
|
|
BLAKE2b-256 checksum How to use checksums |
a2854626dc8795ebef425e63bc6cb465f65a1e10c6e7466799e364fd886b5016
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 15, 2026.
Transparency logRelease files / transitio-0.28.0-cp310-abi3-win_amd64.whl
| Download URL | transitio-0.28.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
f67c3c11d43870304a396ee9717196c931e83beacbd46e90578a2b01aaaae77c
|
|
BLAKE2b-256 checksum How to use checksums |
520e1b88be9b03626703af1e31cb907f070523866bce71ad00a3a68dbb58de91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 15, 2026.
Transparency logRelease files / transitio-0.28.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | transitio-0.28.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
55af1fab08e83249f4be31028325afa5e08932b4ef864f1c9ff3c0f37ecf114d
|
|
BLAKE2b-256 checksum How to use checksums |
7cec9c5d9cda093594310050087ea82e0b841ee05fffa35e3f31fa999e15241e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 15, 2026.
Transparency logRelease files / transitio-0.28.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | transitio-0.28.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
f972ae576306762c8e16721f68f7e1b5d8c08474c54a6bb0d2700b31479baa03
|
|
BLAKE2b-256 checksum How to use checksums |
0447c0bb124ea423376d127f1dd476875443d186b4c1982ee0ab7059d0ab8f8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 15, 2026.
Transparency logRelease files / transitio-0.28.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | transitio-0.28.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
91a71163f9d41500fb3fdce165f387ef9145b7e3345f19e8f7f6a930115fa209
|
|
BLAKE2b-256 checksum How to use checksums |
9e07b67a91567ed4d9679852a61ba9f586c9e208ffe0cff57b4dc38100727f96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 15, 2026.
Transparency logRelease files / transitio-0.28.0-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | transitio-0.28.0-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
8ab86962146e5eba81765b75aa4dc47e578061aa183d96b666055dd2211d9e68
|
|
BLAKE2b-256 checksum How to use checksums |
1fa921e7dbefb3509ddb1ca6a2e79fac0bf9743eb98e57c49c15f4a0a7deed21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 15, 2026.
Transparency log