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.5.2.tar.gz (14.4 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.5.2-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gtfs_flex_to_gofs-0.5.2.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

Hashes for gtfs_flex_to_gofs-0.5.2.tar.gz
Algorithm Hash digest
SHA256 2f6b8813c5644f882f0abd9b6135f4437f56af37d04c2fd73731cc02d40872cf
MD5 e4785101a513f5ac37da57ae149b1967
BLAKE2b-256 bf74cfa5b825a54573375d8de2169e41ec28ba0e54428a28328bf1c77f78c233

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gtfs_flex_to_gofs-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f462e1329a34e0c96587214866b7e371f0f36598d3f97e38bc8308ba1368f8f8
MD5 3d4a1c462625ead078966202c3d39368
BLAKE2b-256 8a5be328021631f498ea5d6894672cae3ced05024069108a7ab4c79c821f6352

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