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", or "tr", 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 followslang.ValueError: invalidtoday,config, orlang.TypeError:feed,today,config, orlanghas 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.
Links
- Web app: https://ttezer.github.io/gtfs-analyzer/
- Source and issues: https://github.com/ttezer/gtfs-analyzer
- Rule reference: https://github.com/ttezer/gtfs-analyzer/blob/main/RULES.en.md
- Changelog: https://github.com/ttezer/gtfs-analyzer/blob/main/CHANGELOG.md
MIT licensed.
Metadata
Release files for gtfs-analyzer 0.17.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gtfs_analyzer-0.17.0.tar.gz | 991.9 kB | With provenance | Details for gtfs_analyzer-0.17.0.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gtfs_analyzer-0.17.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details for gtfs_analyzer-0.17.0-cp39-abi3-win_amd64.whl |
| gtfs_analyzer-0.17.0-cp39-abi3-manylinux_2_34_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.34+ x86-64 | Details for gtfs_analyzer-0.17.0-cp39-abi3-manylinux_2_34_x86_64.whl |
| gtfs_analyzer-0.17.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details for gtfs_analyzer-0.17.0-cp39-abi3-macosx_11_0_arm64.whl |
Total release size: 8.0 MB
Release files / gtfs_analyzer-0.17.0.tar.gz
| Download URL | gtfs_analyzer-0.17.0.tar.gz |
|---|---|
| Size | 991.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f380b7f7652c555a7cab10c830c0a22b8b9266cf31b32e1407067729503c79f3
|
|
BLAKE2b-256 checksum How to use checksums |
9877d6c8c6c4f979d593dd43a97dfa3e30693e61e0df76295481aec7463a23b1
|
| 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 Oct 27, 2026.
Transparency logRelease files / gtfs_analyzer-0.17.0-cp39-abi3-win_amd64.whl
| Download URL | gtfs_analyzer-0.17.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
6f598749ca9fa9a7ec086361c81e54a99ffa8420b8c6e25a6cbe1696a0fa07bd
|
|
BLAKE2b-256 checksum How to use checksums |
b228bc93b830050465728925e910307f674cb8d4b72607295fa69daf42fdc443
|
| 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 Oct 27, 2026.
Transparency logRelease files / gtfs_analyzer-0.17.0-cp39-abi3-manylinux_2_34_x86_64.whl
| Download URL | gtfs_analyzer-0.17.0-cp39-abi3-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.9 Linux glibc 2.34+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
42c862ea902106ec72fbc7fe645e4255833f901b59dd8135475af961c3f8b710
|
|
BLAKE2b-256 checksum How to use checksums |
314b9dd048c74cf5253ff1685d3d71036ba0e13d92b2f2a3b2e4ded8b5f45185
|
| 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 Oct 27, 2026.
Transparency logRelease files / gtfs_analyzer-0.17.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | gtfs_analyzer-0.17.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b9cb9c93425985466e40fff369bdee21b9a0f86e2fb6f05e3348818655cfad6a
|
|
BLAKE2b-256 checksum How to use checksums |
63e341021d88d3311b29e6e123ac1aded6cdbc7b1649323b22ad22daade6557e
|
| 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 Oct 27, 2026.
Transparency logSecurity for gtfs-analyzer 0.17.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.
Attestation for gtfs_analyzer-0.17.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 Oct 27, 2026.
Transparency logA 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.