Skip to main content

Convert GTFS Flex to GOFS

Project description

GTFS-flex-to-GOFS

Build Status License: MIT Python 3.8+

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gtfs_flex_to_gofs-0.6.1.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gtfs_flex_to_gofs-0.6.1-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file gtfs_flex_to_gofs-0.6.1.tar.gz.

File metadata

  • Download URL: gtfs_flex_to_gofs-0.6.1.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gtfs_flex_to_gofs-0.6.1.tar.gz
Algorithm Hash digest
SHA256 588985a7d4b4366d060286e8a6d07eda5925d5c6e0b1b1d44cba5b3633f5b757
MD5 752806959c171566325e004862f89f5c
BLAKE2b-256 d91198a56ee5a98676392ee234c8aecfd882df31f5ecb2b456a343c8b1663e47

See more details on using hashes here.

File details

Details for the file gtfs_flex_to_gofs-0.6.1-py3-none-any.whl.

File metadata

File hashes

Hashes for gtfs_flex_to_gofs-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4a0298d73f18bfab0fb54e783ed67cc81671ed100eadff49367aebc83743f003
MD5 a27e5d788455ede50a769a278a3676bd
BLAKE2b-256 2689d9d6a8d1c3247c445e6b3a3566d2cf7febc351ae39347980884deb8727e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page