Skip to main content

gtfs-garage-core

The library behind GTFS Garage: load a GTFS feed into DuckDB, convert it to Parquet, and query it. No web server and no interface. It depends only on duckdb.

pip install gtfs-garage-core
from pathlib import Path

from gtfs_garage_core import GtfsFeed, query_table

feed = GtfsFeed("feed.zip")
print(query_table(feed, "routes", page=1, page_size=20))
feed.export_parquet(Path("out"))  # {table}.parquet + manifest.json
feed.close()

Converting one table at a time

gtfs_garage_core.convert does the conversion without a GtfsFeed, one table at a time, so peak memory tracks the largest table rather than the whole feed:

from pathlib import Path

import duckdb
from gtfs_garage_core.convert import convert_table, manifest_entry, number_lines, register_table, write_manifest

con = duckdb.connect()
columns = register_table(con, "stops", Path("stops.txt"))
convert_table(con, "stops", Path("out/stops.parquet"))
checked = number_lines(con, Path("stops.txt"), Path("out/stops.parquet"))  # before stops.txt goes

number_lines records the line of the file each row came from, as gtfs-validator counts it: checked.quality is the manifest entry's lines value. When records and lines disagree it adds a _line column to the Parquet, which a reader leaves out of the table's columns.

The output is the dataset GTFS Garage's viewer reads, in the browser or on a server. Every column is text, and empty fields are NULL. The manifest records each table's rows and sizes.

gtfs-garage is released together with this package and depends on its exact version. Code that imports gtfs_garage.core keeps working: it is the same package under its old name.

Metadata

Release files for gtfs-garage-core 0.7.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-garage-core 0.7.0
File Size Uploaded Provenance Actions
gtfs_garage_core-0.7.0.tar.gz 52.4 kB With provenance Details for gtfs_garage_core-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gtfs-garage-core 0.7.0
File Interpreter ABI Platform Actions
gtfs_garage_core-0.7.0-py3-none-any.whl Python 3 none any Details for gtfs_garage_core-0.7.0-py3-none-any.whl

Total release size: 113.6 kB

Release files / gtfs_garage_core-0.7.0.tar.gz

Download URL gtfs_garage_core-0.7.0.tar.gz
Size 52.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bcfb8c0e2ac77f02273e97c640cacdcd8dcf9013553c859205980699ae813222
BLAKE2b-256 checksum
How to use checksums
b00154ffc15821ad030d66aeef2d18254509afbf3a4185c5fa5d5cfdc4276039
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 5, 2026.

Transparency log

Release files / gtfs_garage_core-0.7.0-py3-none-any.whl

Download URL gtfs_garage_core-0.7.0-py3-none-any.whl
Size 61.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8cd3ddc5f79b126b9ec830275445e36b98a87ff5dea9ee2d95f9d3b08c4e38d2
BLAKE2b-256 checksum
How to use checksums
ccdfe69ec56d4f3eee9138411571342a1debeec45b99407ecb6e29ffb5413502
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 5, 2026.

Transparency log

Security for gtfs-garage-core 0.7.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gtfs_garage_core-0.7.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 Dec 5, 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.

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files Full provenance

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