gtfs_parser
LICENSE
MIT License
Installation
pip install gtfs-parser
API
import gtfs_parser
# construct GTFS object
gtfs = gtfs_parser.GTFSFactory(zip_path)
# parse as GeoJSON
stops = gtfs_parser.parse.read_stops(gtfs)
routes = gtfs_parser.parse.read_routes(gtfs)
# aggregate frequency
aggregator = gtfs_parser.aggregate.Aggregator(gtfs, yyyymmdd=yyyymmdd)
interpolated_stops = aggregator.read_interpolated_stops()
route_freq = aggregator.read_route_frequency()
CLI
usage: gtfs-parser [-h] [--parse_ignoreshapes] [--parse_ignorenoroute]
[--aggregate_yyyymmdd AGGREGATE_YYYYMMDD]
[--aggregate_nounifystops]
[--aggregate_delimiter AGGREGATE_DELIMITER]
[--aggregate_begintime AGGREGATE_BEGINTIME]
[--aggregate_endtime AGGREGATE_ENDTIME]
mode src dst
positional arguments:
mode
src
dst
optional arguments:
-h, --help show this help message and exit
--parse_ignoreshapes
--parse_ignorenoroute
--aggregate_yyyymmdd AGGREGATE_YYYYMMDD
--aggregate_nounifystops
--aggregate_delimiter AGGREGATE_DELIMITER
--aggregate_begintime AGGREGATE_BEGINTIME
--aggregate_endtime AGGREGATE_ENDTIME
Example
gtfs-parser parse gtfs.zip output
gtfs-parser parse gtfs_dir output --parse_ignoreshapes
gtfs-parser aggregate gtfs.zip output
gtfs-parser aggregate gtfs_dir output --aggregate_nounifystops
Development
uv sync
uv run pytest
uv run ruff check
uv run ruff format
Authors
Release files for gtfs-parser 0.3.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 | |
|---|---|---|---|
| gtfs_parser-0.3.0.tar.gz | 9.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gtfs_parser-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.5 kB
Release files / gtfs_parser-0.3.0.tar.gz
| Download URL | gtfs_parser-0.3.0.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
db4008678a39bb7cb70ed190e8e1255fcab1398fd9154cae01e68e24ed13d196
|
|
BLAKE2b-256 checksum How to use checksums |
cd36fe6572f80f50c8bde05144a54097fdd279f2fb1b41bc12cbfbd24a838e84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / gtfs_parser-0.3.0-py3-none-any.whl
| Download URL | gtfs_parser-0.3.0-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d61ddefb24ff4d05100ff37eb6999817d3473dbb7c82f79963888a74420134b
|
|
BLAKE2b-256 checksum How to use checksums |
ea91b1d505d7d6871f80edeb54cce5ced976789c4602a5d39f286f1e547df081
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|