Skip to content

Getting Started

Continuous GTFS provides a Python framework for transforming GTFS schedule and realtime feeds. You define transforms as Python code in a folder, and the framework discovers them, resolves their dependencies, and executes them as a pipeline.

Install

cd pipeline
uv sync

Quick start

1. Create a pipeline folder

my-pipeline/
  feed_info.py
  stop_cleanup.py

Each .py file defines one or more Steps — the framework scans the folder and discovers them automatically.

2. Define a transform

# my-pipeline/feed_info.py
from continuous_gtfs.builtins.schedule import UpdateFeedInfo

update_feed = UpdateFeedInfo(
    publisher_name="My Transit Agency",
    publisher_url="https://example.com",
)

That's it. update_feed is a Step instance that the scanner will find by variable name.

3. Run it

# See what the pipeline contains
continuous-gtfs dag my-pipeline/

# Run against a GTFS zip
continuous-gtfs schedule input.zip my-pipeline/ -o output.zip

# Run against a realtime protobuf feed
continuous-gtfs realtime vehicle_positions.pb my-pipeline/ -o output.pb

4. Inspect the output

Schedule pipeline: 632ms
  Input:  22 files, 178485 rows
  Output: 22 files, 178461 rows
  ingest: 105ms
  validate_input: 21ms
  transform: 22ms
  validate_output: 12ms
  package: 472ms