Skip to main content

MTAtabase

A Python library for parsing realtime MTA subway data and matching it against static GTFS schedules with no API key required.

License: GPL v3 Python 3.13+ PyPI version

Overview

Most MTA data tools require you to register for an API key and hit live endpoints to get realtime train information. MTAtabase parses an archive of MTA data feeds and correlates them with static GTFS schedule files locally, with no API credentials needed.

Third-party realtime data is sourced from subwaydata.nyc.

Features

  • Parse MTA realtime train data without an API key
  • Match live trip updates to static GTFS schedule data
  • Works offline once data is fetched
  • Built on pandas for easy data manipulation
  • Includes a bundled schema for GTFS data structures

Requirements

  • Python 3.13+
  • uv (recommended) or pip

Installation

With pip

pip install MTAtabase

From source

git clone https://github.com/pacmanboss256/mtatabase.git
cd mtatabase
uv sync

Usage

from MTAtabase import MTAtabase

# Initialize the database
db = MTAtabase(subway_data_path,gtfs_path)

Project Structure

mtatabase/
├── mtatabase/      # Core library source
├── data/           # subwaydata.nyc data
├── gtfs/			# GTFS files
├── schema/         # Project schema definitions
└── pyproject.toml

Data Sources

  • Realtime data: subwaydata.nyc — a third-party archive of MTA subway feeds
  • Static GTFS: MTA's published schedule files (stops, routes, trips, etc.)

License

This project is licensed under the GNU General Public License v3.0.


This project is not affiliated with or endorsed by the Metropolitan Transportation Authority (MTA).

Metadata

Release files for MTAtabase 0.2.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 MTAtabase 0.2.0
File Size Uploaded Provenance Actions
mtatabase-0.2.0.tar.gz 20.5 kB Without provenance Details for mtatabase-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for MTAtabase 0.2.0
File Interpreter ABI Platform Actions
mtatabase-0.2.0-py3-none-any.whl Python 3 none any Details for mtatabase-0.2.0-py3-none-any.whl

Total release size: 42.7 kB

Release files / mtatabase-0.2.0.tar.gz

Download URL mtatabase-0.2.0.tar.gz
Size 20.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7d4f4f3c343dc85b58114ecaba9c6985201326c1aaadc5c788723c9d05ae4ea4
BLAKE2b-256 checksum
How to use checksums
2352b5641a346445df390adb903a97b9416834e35ecfe51ab5fbb66ab42e19b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / mtatabase-0.2.0-py3-none-any.whl

Download URL mtatabase-0.2.0-py3-none-any.whl
Size 22.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3c5581baf322b4fcacda2b7c08c62bf2f56dba9909c2482e5c93ec2e68495f1
BLAKE2b-256 checksum
How to use checksums
8f2121f9dfa535fbf87740e7129499e20f57cf35f31a25fcf0933fdcd76c2b3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Security for MTAtabase 0.2.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.2.0 This release

2 release files No 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