Skip to main content

gtfs-analyzer

GTFS Schedule validation and feed-quality analysis for Python, powered by the Rust engine of GTFS Analyzer. The package runs the same pipeline as the web app, the CLI, the Rust crates, and the gtfs-sdk npm package, so a feed gets the same findings and scores everywhere. Validation happens in-process; the feed is never uploaded.

  • 619 rules across GTFS Schedule, GTFS-Flex, Fares v2, and GTFS-JP
  • Spec / Interop / Quality / Analytics classification, per-feed scores, and a publishability verdict
  • One abi3 wheel per platform for CPython 3.9+ (Linux x86_64, macOS arm64, Windows x86_64); other platforms build from the source distribution, which needs a Rust toolchain

Installation

pip install gtfs-analyzer

Usage

from gtfs_analyzer import validate_gtfs

result = validate_gtfs("feed.zip")

print(result["validation_status"])            # "COMPLETE" or "PARTIAL"
print(result["reports"]["r1"]["publishable"])  # publishability verdict
print(result["metrics"]["overall_score"])

for notice in result["notices"]:
    print(notice["rule_id"], notice["severity"], notice["file"], notice["line"])

validate_gtfs(feed, *, today=None, config=None, include_name_index=False, lang="en")

Argument Meaning
feed Path to a GTFS ZIP (str or pathlib.Path) or the ZIP as bytes
today Reference date for calendar checks: YYYYMMDD int or "YYYY-MM-DD" / "YYYYMMDD" string. Defaults to the local date. Pin it for reproducible results.
config Optional mapping of engine settings, e.g. {"disabled_rule_ids": ["TRP_020"]}. Unknown keys are rejected.
include_name_index Include the stop/route name lookup table (large; omitted by default)
lang Language of title, message, and remediation: "en" (default), "fr", "ja", "tr", or "es" (Spanish has planner cards only, so these texts stay English), as the CLI's --lang. Missing entries fall back to English.

The returned dict is the engine's result object:

Key Content
validation_status COMPLETE, or PARTIAL when a limit stopped part of the analysis (see partial)
notices Findings with rule_id, severity, rule_class, file, line, field, observed_value, expected_value, message, remediation
reports Report views r1–r9; r1 holds the publishability verdict
metrics Scores and feed statistics (service window, trip counts, notice counts per class)
capped_totals True counts for rules whose notices were capped
agency_breakdown Per-rule finding counts by agency (agencies, rules)
feed_summary Agency contacts from agency.txt (up to 100, plus agency_count) and the publisher fields of feed_info.txt
partial Present only for PARTIAL results: what was skipped and why

Texts follow lang; use rule_id, not the message text, for program logic. The rule reference describes every rule.

Errors

  • gtfs_analyzer.ValidationError: the feed could not be validated at all, for example an unreadable ZIP. The message starts with the error code (ZipUnreadable: ...) and follows lang.
  • ValueError: invalid today, config, or lang.
  • TypeError: feed, today, config, or lang has the wrong type.

A feed with errors is not an exception: its findings are in notices.

Versioning

The package version is the engine version. gtfs_analyzer.__version__, the CLI, and the Rust crates of the same version produce the same results.

MIT licensed.

Metadata

Release files for gtfs-analyzer 0.19.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gtfs-analyzer 0.19.0
File Size Uploaded Provenance Actions
gtfs_analyzer-0.19.0.tar.gz 1.2 MB With provenance Details for gtfs_analyzer-0.19.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for gtfs-analyzer 0.19.0
File Interpreter ABI Platform Actions
gtfs_analyzer-0.19.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for gtfs_analyzer-0.19.0-cp39-abi3-win_amd64.whl
gtfs_analyzer-0.19.0-cp39-abi3-manylinux_2_34_x86_64.whl CPython 3.9 abi3 Linux glibc 2.34+ x86-64 Details for gtfs_analyzer-0.19.0-cp39-abi3-manylinux_2_34_x86_64.whl
gtfs_analyzer-0.19.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for gtfs_analyzer-0.19.0-cp39-abi3-macosx_11_0_arm64.whl

Total release size: 8.9 MB

Release files / gtfs_analyzer-0.19.0.tar.gz

Download URL gtfs_analyzer-0.19.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
0d0f9db57a97cb3a51d858a6f584f93adcbcc7815253c8b2cce76bd23b1ec0c9
BLAKE2b-256 checksum
How to use checksums
85eb4a181e19f22c8d98add04c5b7f90b903d9c174c643d8fdf815abcb2ddc3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / gtfs_analyzer-0.19.0-cp39-abi3-win_amd64.whl

Download URL gtfs_analyzer-0.19.0-cp39-abi3-win_amd64.whl
Size 2.6 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
f3d9c4a855e808d76f1addee651d515d0c0550be00cf9da0900f1f1cf1e47f97
BLAKE2b-256 checksum
How to use checksums
7689c9e45604d5810eaf0444b5641f36a140a2006420aacfc14507daed47581a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / gtfs_analyzer-0.19.0-cp39-abi3-manylinux_2_34_x86_64.whl

Download URL gtfs_analyzer-0.19.0-cp39-abi3-manylinux_2_34_x86_64.whl
Size 2.7 MB
Tags CPython 3.9 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
9ee1427bae8f5d2446ce7573efdc8f56c77c08d6704d535c658097e9e2b707be
BLAKE2b-256 checksum
How to use checksums
404e027bdbb0ba689ad2a8bd4e339d7766f3307512238df2c12c8e10fb026a8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / gtfs_analyzer-0.19.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL gtfs_analyzer-0.19.0-cp39-abi3-macosx_11_0_arm64.whl
Size 2.4 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d635f620dd206bd639100d9f5ed22004c2741f883e1846839f4f488778e1fd38
BLAKE2b-256 checksum
How to use checksums
e52f2d898400063527353b9366f2396c636e51f621463e96c0b0ec9d5d01776a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for gtfs-analyzer 0.19.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for gtfs_analyzer-0.19.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page