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

Uploaded Python 3

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

Hashes for gtfs_flex_to_gofs-0.5.1.tar.gz
Algorithm Hash digest
SHA256 02a37cd82c1f150091fd1388602c9639afb9c75415a2c7fb45e411676f1de33f
MD5 383480bb4adcdbdc1500ffd0fabc50a3
BLAKE2b-256 0f82e1a82ee4ca03ea764dc5f1843194053704f963844a9953c611ad448055e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gtfs_flex_to_gofs-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 487b216f512be07e23cc2318d4d1323c38b4b03aaa4e8591f707cd63f4327f6d
MD5 34f6f2a841dad131581197fab649aa0c
BLAKE2b-256 747e62c672f60f745be2ab9f5110250c9e86415357fab461910eeaba4f665a7a

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