Convert GTFS Flex to GOFS
Project description
GTFS-flex-to-GOFS
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.
Installation
Install from PyPI:
pip install GTFS-flex-to-GOFS
Or install from source:
git clone https://github.com/TransitApp/GTFS-flex-to-GOFS.git
cd GTFS-flex-to-GOFS
uv sync --extra dev
Usage
gtfs-flex-to-gofs --gtfs-dir <input_dir> --gofs-dir <output_dir> --url <base_url>
Command Line Options
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
Development
Running Tests
uv run python -m pytest .
# or for verbose output:
uv run python -m pytest tests/ -v
Regenerating Test Fixtures
./createTests.sh
Features
- 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
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Related Projects
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gtfs_flex_to_gofs-0.5.1.tar.gz.
File metadata
- Download URL: gtfs_flex_to_gofs-0.5.1.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02a37cd82c1f150091fd1388602c9639afb9c75415a2c7fb45e411676f1de33f
|
|
| MD5 |
383480bb4adcdbdc1500ffd0fabc50a3
|
|
| BLAKE2b-256 |
0f82e1a82ee4ca03ea764dc5f1843194053704f963844a9953c611ad448055e8
|
File details
Details for the file gtfs_flex_to_gofs-0.5.1-py3-none-any.whl.
File metadata
- Download URL: gtfs_flex_to_gofs-0.5.1-py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
487b216f512be07e23cc2318d4d1323c38b4b03aaa4e8591f707cd63f4327f6d
|
|
| MD5 |
34f6f2a841dad131581197fab649aa0c
|
|
| BLAKE2b-256 |
747e62c672f60f745be2ab9f5110250c9e86415357fab461910eeaba4f665a7a
|