Skip to main content

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

Download files

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

Source Distribution

transitio-0.5.0.tar.gz (92.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

transitio-0.5.0-cp310-abi3-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10+Windows x86-64

transitio-0.5.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

transitio-0.5.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

transitio-0.5.0-cp310-abi3-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

transitio-0.5.0-cp310-abi3-macosx_10_12_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file transitio-0.5.0.tar.gz.

File metadata

  • Download URL: transitio-0.5.0.tar.gz
  • Upload date:
  • Size: 92.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for transitio-0.5.0.tar.gz
Algorithm Hash digest
SHA256 18154fd0aab0f074c1255312f7928bf1ea13f511eb51ba49c7f035f4cfe54553
MD5 81e29d02d8f8f186c2fc4c8bb6673edb
BLAKE2b-256 266dd6f23a1c199dd95a7d86fea403eb2870414a6eeaa8618a2be4471d2357d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for transitio-0.5.0.tar.gz:

Publisher: release.yaml on cafein-py/transitio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file transitio-0.5.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: transitio-0.5.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/7.0.0 CPython/3.13.14

File hashes

Hashes for transitio-0.5.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 03c24894cc52eab91a0bcb4732c35cff71c56ed50444b3e02810d75551a2b3ef
MD5 ef992ed9db2aeb062634e110e2d6e325
BLAKE2b-256 2b433a2f9cb31fd8d9d9b628c38fbf709eeacc602b5cad1570c7f77eaa959a17

See more details on using hashes here.

Provenance

The following attestation bundles were made for transitio-0.5.0-cp310-abi3-win_amd64.whl:

Publisher: release.yaml on cafein-py/transitio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file transitio-0.5.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for transitio-0.5.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 19e9b085424ddd4c842da6de4c4ce269590df3cd45fd5cb96dfd8f54dc249b38
MD5 4bf058edd0a4e23b93f7d81fcba47a39
BLAKE2b-256 0e15feb0a933850ea0d6cc86714615c0ab3d18babd17f23eb52da77d1182f55a

See more details on using hashes here.

Provenance

The following attestation bundles were made for transitio-0.5.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yaml on cafein-py/transitio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file transitio-0.5.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for transitio-0.5.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 747b0d747c994ec7589ee887896a5fd4a731b16e3a12d5a73df21f620d4c97f4
MD5 187a6f26aa923c476c6b926046a3d1b6
BLAKE2b-256 6b36df50691360f056dbe33677a200020e5338fa4fbb0472c921c10f5f80c7c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for transitio-0.5.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yaml on cafein-py/transitio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file transitio-0.5.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for transitio-0.5.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c56970cf702507aa2b2bea68a01491ad2c6cebaf09ebc10f2ae63a6159497ecb
MD5 22ebfcaeb499c1ad1dc1033c13180fe4
BLAKE2b-256 c73a9ccf88fda03ebe478101e0eaf7c44496edd170774aae2571b2d886388a17

See more details on using hashes here.

Provenance

The following attestation bundles were made for transitio-0.5.0-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: release.yaml on cafein-py/transitio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file transitio-0.5.0-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for transitio-0.5.0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b6e89b1d4c72981b8207639bb7508638b9e36af0d5185b4474290485dc44627c
MD5 e6de54a69f0c4e78a7408adf327d4242
BLAKE2b-256 46d800462b1577e8e285799ab29ac710df221f0aa2360aa615359f815d062a1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for transitio-0.5.0-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yaml on cafein-py/transitio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.11.0

6 files

0.10.0

6 files

0.9.0

6 files

0.8.0

6 files

0.7.0

6 files

0.6.0

6 files

This release

0.5.0 This release

6 files

0.4.0

6 files

0.3.0

6 files

0.2.0

6 files

0.1.0

6 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page