API reference#
fetch() is the main entry point: it runs the whole
acquisition pipeline for an area of interest and returns a
FetchResult. Every stage is also available on its own —
the catalog client, the OSM fetcher, and the validate/repair/crop functions.
The pipeline#
|
Fetch everything cafein needs for an AOI in one call. |
|
What the pipeline produced for one AOI. |
|
Build a routable |
|
Open the OSM extract as a |
The feed catalog#
|
Synchronous client for the Mobility Database catalog API. |
|
Search GTFS feeds in the Mobility Database catalog. |
|
Fetch a single feed by its catalog ID. |
|
List catalogued dataset versions of a feed, newest first. |
|
Pick the dataset whose published service range covers a date. |
|
Download a dataset zip with checksum verification and caching. |
|
Download the latest hosted dataset zip of a feed. |
|
Fetch the hosted canonical-validator JSON report for a dataset. |
Close the underlying HTTP session. |
|
|
A GTFS feed catalogued in the Mobility Database. |
|
One downloadable version of a feed, with its service date range. |
OSM extracts#
|
Download (and by default crop) the OSM extract covering an AOI. |
Validation, repair and cropping#
|
Validate a GTFS zip and return the collected notices. |
|
Repair a GTFS zip under the gtfstidy contract and write the result. |
|
Crop a GTFS zip to an area of interest and/or a date window. |
Reporting#
|
Merge a |
|
Summarize local-versus-canonical agreement in a merged report. |
|
Render a merged report as Markdown. |
|
Render a merged report as a self-contained HTML page. |
Exceptions#
Base class for all transitio-specific errors. |
|
No Mobility Database refresh token is available. |
|
A dataset cannot be downloaded or fails checksum verification. |
|
No OSM extract covers the requested area. |