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.0.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.6.0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gtfs_flex_to_gofs-0.6.0.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.6.0.tar.gz
Algorithm Hash digest
SHA256 a6de79d2d2037186b92befc821870c35a0d0b43ffb58277814c1b99508fa251d
MD5 1c6c420e765ef5a09ea2e8cf562d4d33
BLAKE2b-256 8334ff0f646562e97ab3dacd03b88a5cef71ac8079b2a2173eaf3dcc38295020

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gtfs_flex_to_gofs-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 012e41a73708a66d8578f937326a7cc754d6f132b4aa45abb5ec8757d2f7d1d7
MD5 715721d57c4ec99b6dc4c998fbfbb1ef
BLAKE2b-256 8c329741223c658197bbfeec9eab7e3b5746b71cf417128dd82f9dabcda1dc8e

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