A Python tool to convert GTFS-Flex (General Transit Feed Specification - Flexible services) data to the GOFS (General On-demand Feed Specification) format.
This tool processes on-demand and flexible transit services data from GTFS-Flex feeds and outputs standardized GOFS files for consumption by trip planning applications and mobility platforms.
Install from PyPI:
pip install GTFS-flex-to-GOFSOr install from source:
git clone https://github.com/TransitApp/GTFS-flex-to-GOFS.git
cd GTFS-flex-to-GOFS
uv sync --extra devgtfs-flex-to-gofs --gtfs-dir <input_dir> --gofs-dir <output_dir> --url <base_url>optional arguments:
-h, --help show this help message and exit
--gtfs-dir Dir input gtfs directory
--gofs-dir Dir output gofs directory
--url URL auto-discovery url. Base URL indicate for where each files will be uploaded (and downloadable)
--ttl TTL time to live of the generated gofs files in seconds (default: 86400)
--no-warning Silence warnings
uv run python -m pytest .
# or for verbose output:
uv run python -m pytest tests/ -v./createTests.sh- Converts GTFS-Flex pure microtransit services to GOFS format
- Supports zone-based on-demand transit operations
- Generates all required GOFS files (zones, calendars, fares, booking rules, etc.)
- Optional split-by-route output for multi-service feeds
- Automated CI/CD with GitHub Actions
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.