AOI-driven OSM and GTFS acquisition, validation and repair — companion to pyrosm and cafein
Project description
transitio
AOI-driven OSM and GTFS acquisition, validation and repair — companion to pyrosm and cafein. transitio moves the raw ingredients of routing — OSM extracts and GTFS timetables — from the open data ecosystem to your area of interest, validated and repaired, ready for cafein to brew into routing results.
Status: early development. Acquisition (Mobility Database catalog + OSM
extracts), GTFS validation, repair and cropping are in place, tied together by
the one-call transitio.fetch pipeline.
Quick example
import transitio
# One call: OSM extract + validated GTFS feeds for an area of interest.
result = transitio.fetch(helsinki_polygon) # any shapely geometry,
# bbox tuple or place name
result.osm_pbf # cropped OSM extract (path)
result.feeds # downloaded, cropped and validated GTFS feeds (paths)
result.reports # per-feed merged validation reports
result.skipped # (feed id, reason) for anything left out
net = result.to_cafein() # routable cafein.TransportNetwork
osm = result.to_pyrosm() # pyrosm.OSM reader over the extract
fetch accepts when="2026-09-01" to pick the dataset versions covering a
service day (needs a free Mobility Database API token, passed as
refresh_token= or via the MOBILITY_API_REFRESH_TOKEN environment
variable), modes=["rail", "tram"] to keep only feeds serving given modes,
and repair=True to repair feeds before use. With a token, GTFS downloads
are catalogued dataset versions verified against catalog checksums; without
one, the latest hosted zips are fetched as-is — unverified moving targets.
Lower-level access
Each pipeline stage is available on its own:
db = transitio.MobilityDatabase()
feeds = db.search_feeds(aoi=helsinki_polygon)
dataset = db.dataset_for(feeds[0], when="2026-09-01")
path = db.download(dataset) # cached, checksum-verified
report = db.validation_report(dataset) # hosted canonical-validator report
pbf = transitio.fetch_pbf(helsinki_polygon) # cropped OSM extract
validation = transitio.validate_feed(path) # canonical-code notices
transitio.repair_feed(path, "repaired.zip") # gtfstidy-contract repair
transitio.crop_feed(path, "cropped.zip", aoi=helsinki_polygon)
Documentation
The Sphinx site lives in docs/. Building it needs transitio itself
installed (autodoc imports the real package) plus the Sphinx toolchain:
pip install . -r docs/requirements.txt
sphinx-build -b html docs docs/_build/html
The hosted version lives at https://transitio.readthedocs.io.
Installation
pip install transitio
Binary wheels cover Linux, macOS and Windows. Building from source instead
requires a Rust toolchain (pip install .).
License
MIT
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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file transitio-0.2.0.tar.gz.
File metadata
- Download URL: transitio-0.2.0.tar.gz
- Upload date:
- Size: 83.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d40c6244a6ab8fe6ebaa21096e4eab6eebf398cc4673fd69f27974b97c90bfe
|
|
| MD5 |
4bde7b862c407341c195a2a5410681fc
|
|
| BLAKE2b-256 |
2529500be70d9d1f8305222077c730141c5575c0a73db5e8dfb3aaa55dbece88
|
Provenance
The following attestation bundles were made for transitio-0.2.0.tar.gz:
Publisher:
release.yaml on cafein-py/transitio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
transitio-0.2.0.tar.gz -
Subject digest:
5d40c6244a6ab8fe6ebaa21096e4eab6eebf398cc4673fd69f27974b97c90bfe - Sigstore transparency entry: 2211580633
- Sigstore integration time:
-
Permalink:
cafein-py/transitio@5c9452b7659ebd6f4f66d773be74c397c76536b5 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/cafein-py
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@5c9452b7659ebd6f4f66d773be74c397c76536b5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file transitio-0.2.0-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: transitio-0.2.0-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
937741f401b61c6c832347337eb0bdc5634123105de124980d0421d06c639766
|
|
| MD5 |
96118e34e98ec12ce517f2a4642a3a51
|
|
| BLAKE2b-256 |
982db82fffd9e6de8df0ff96fb69e0f346f8553c7a6430b58eb84ae619a792ab
|
Provenance
The following attestation bundles were made for transitio-0.2.0-cp310-abi3-win_amd64.whl:
Publisher:
release.yaml on cafein-py/transitio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
transitio-0.2.0-cp310-abi3-win_amd64.whl -
Subject digest:
937741f401b61c6c832347337eb0bdc5634123105de124980d0421d06c639766 - Sigstore transparency entry: 2211580686
- Sigstore integration time:
-
Permalink:
cafein-py/transitio@5c9452b7659ebd6f4f66d773be74c397c76536b5 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/cafein-py
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@5c9452b7659ebd6f4f66d773be74c397c76536b5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file transitio-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: transitio-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c51e92bd125346c8d2f9519982689a47efd38e9952ac22cafb42bc80b300b134
|
|
| MD5 |
a129d03cfa6352cdf0d8e22c0cd8f289
|
|
| BLAKE2b-256 |
3ea5bbb9142d21609492eb5368561c542f8d0dac9766cc32702eb230f71b8e89
|
Provenance
The following attestation bundles were made for transitio-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yaml on cafein-py/transitio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
transitio-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
c51e92bd125346c8d2f9519982689a47efd38e9952ac22cafb42bc80b300b134 - Sigstore transparency entry: 2211580701
- Sigstore integration time:
-
Permalink:
cafein-py/transitio@5c9452b7659ebd6f4f66d773be74c397c76536b5 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/cafein-py
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@5c9452b7659ebd6f4f66d773be74c397c76536b5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file transitio-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: transitio-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4415324cfe187e0826fd584a8c4370d5567606bc421ac3e544ea678ec560498
|
|
| MD5 |
705aab13a731521bfc2f571724c64bce
|
|
| BLAKE2b-256 |
62fb180c6c8ba71887498949d79ec246a80f129c875af0479bfc5a39b934d067
|
Provenance
The following attestation bundles were made for transitio-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yaml on cafein-py/transitio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
transitio-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
b4415324cfe187e0826fd584a8c4370d5567606bc421ac3e544ea678ec560498 - Sigstore transparency entry: 2211580666
- Sigstore integration time:
-
Permalink:
cafein-py/transitio@5c9452b7659ebd6f4f66d773be74c397c76536b5 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/cafein-py
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@5c9452b7659ebd6f4f66d773be74c397c76536b5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file transitio-0.2.0-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: transitio-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9a30c371d797ff1e6569ae6670c8a031ded4fca5f94991e5f9562cdd18d2c7f
|
|
| MD5 |
1d97dabfec6c4d0b3f939bd4fafee874
|
|
| BLAKE2b-256 |
83b57d1fc6994124b4cfb1047ec5008ceb1d771fe85b59b75cdea3e9bdd1eae9
|
Provenance
The following attestation bundles were made for transitio-0.2.0-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yaml on cafein-py/transitio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
transitio-0.2.0-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
a9a30c371d797ff1e6569ae6670c8a031ded4fca5f94991e5f9562cdd18d2c7f - Sigstore transparency entry: 2211580722
- Sigstore integration time:
-
Permalink:
cafein-py/transitio@5c9452b7659ebd6f4f66d773be74c397c76536b5 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/cafein-py
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@5c9452b7659ebd6f4f66d773be74c397c76536b5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file transitio-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: transitio-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfe80259239a0a79cbbb6479580282bac47e875df94c2c7b5d479957ba4dd148
|
|
| MD5 |
f2a7111f4366b47a0686cd2161944aea
|
|
| BLAKE2b-256 |
3ce77215ce8cda7369bb990a513bac9bcb518ad887377efe6439d14254499971
|
Provenance
The following attestation bundles were made for transitio-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yaml on cafein-py/transitio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
transitio-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl -
Subject digest:
bfe80259239a0a79cbbb6479580282bac47e875df94c2c7b5d479957ba4dd148 - Sigstore transparency entry: 2211580652
- Sigstore integration time:
-
Permalink:
cafein-py/transitio@5c9452b7659ebd6f4f66d773be74c397c76536b5 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/cafein-py
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@5c9452b7659ebd6f4f66d773be74c397c76536b5 -
Trigger Event:
push
-
Statement type: