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.6.0.tar.gz (96.5 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.6.0-cp310-abi3-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.10+Windows x86-64

transitio-0.6.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.6.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.6.0-cp310-abi3-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

transitio-0.6.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.6.0.tar.gz.

File metadata

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

File hashes

Hashes for transitio-0.6.0.tar.gz
Algorithm Hash digest
SHA256 42affe1cbb010880ef1bf5d888e7fad735c0954421fae72f407ba64dd1890244
MD5 383b4fd1d1bb45fb99a4ec5949a96754
BLAKE2b-256 ebddb8bf27d4a9d9e51f61970d61d0c7dd6f3035c582f659dad39558714b0a2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for transitio-0.6.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.6.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: transitio-0.6.0-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.2 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.6.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 1c2dbc87b46931615f68e86dca451f02587b3152923d6410a4f093b3730adccd
MD5 d5e48159fd253b32403aa7320f326388
BLAKE2b-256 c60e9f4b295593460fc79e7bf892cd56ad6af26adbe21804ada3708a7d4eecb2

See more details on using hashes here.

Provenance

The following attestation bundles were made for transitio-0.6.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.6.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for transitio-0.6.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 913fd6cbfbf49b90ac44572208c774bf601d690b9c9145da02c2c16f281009db
MD5 d15067fc5f69bba59783386e9a9adf6f
BLAKE2b-256 7bf3d9a2f91f299cef1b65954b9e4927eea9b477286fe1b306ec3bb1a99a8da6

See more details on using hashes here.

Provenance

The following attestation bundles were made for transitio-0.6.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.6.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for transitio-0.6.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ae0525c81a6e7d1ad90f40197ba9a9185873187e6a242db74954eba0dd9f49dc
MD5 0e96bcf2a5dc9b52bf355910902a178a
BLAKE2b-256 1ef07830d7bf477b59f9dbdb54a235e2f55c8d2b39431dc6e15ef10e9d44db80

See more details on using hashes here.

Provenance

The following attestation bundles were made for transitio-0.6.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.6.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for transitio-0.6.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 44a1d1ed3e6b92d60f4566fe785bf5c9aba6da30b83c7f1c3b4989bed05217a1
MD5 81869259842b0191dc4160065207d940
BLAKE2b-256 16834b12893b537811a3cbcaa5eb9fbf3aad202b61cb8fa2366bacafef9b0c6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for transitio-0.6.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.6.0-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for transitio-0.6.0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1606e1347155504b88be552ad4f50b9c6ec316c5464d2e2a2f1cd47d1aa77253
MD5 35dc315fdf14068d37286a593200c247
BLAKE2b-256 4ca0f492a2403638e36089b83e4e6699c108b8cb9d341b916eebfcea529005ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for transitio-0.6.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

This release

0.6.0 This release

6 files

0.5.0

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