Skip to main content

Metro Transit Python SDK

A community-built Python SDK for accessing Metro Transit's NexTrip data.

>>> from metrotransit import Client
>>> from metrotransit.api.nex_trip import get_nextrip_route_id_direction_id_place_code as get_details

>>> client = Client(base_url="https://svc.metrotransit.org")

# Get upcoming trips for the westbound Green Line at East Bank Station
>>> get_details.sync('902', 0, 'EABK', client=client)
NexTripResult(...)

Total Downloads Supported Versions GitHub last commit

Installation

The SDK is available on PyPI. Install it with your preferred package manager:

$ uv add metrotransit
$ pip install metrotransit

The SDK officially supports Python 3.10+.

Documentation

Every path/method combo in the official spec is represented as a Python module with four functions, and all parameters can be provided with method arguments:

  • sync: Blocking request that returns parsed data (if successful) or None
  • sync_detailed: Blocking request that always returns a Request, optionally with parsed set if the request was successful.
  • asyncio: Like sync but async instead of blocking
  • asyncio_detailed: Like sync_detailed but async instead of blocking

Metadata

Release files for metrotransit 0.1.2

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

Source distribution (sdist)

Source distribution for metrotransit 0.1.2
File Size Uploaded
metrotransit-0.1.2.tar.gz 11.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for metrotransit 0.1.2
File Interpreter ABI Platform
metrotransit-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 39.0 kB

Release files / metrotransit-0.1.2.tar.gz

Download URL metrotransit-0.1.2.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
48617292959adab478a5d5174a6134e0ab09e47d667e82f6ff018a4762e1c3be
BLAKE2b-256 checksum
How to use checksums
ce935dbbca519a3e67547c1103b7783dcb842c07f6c5d664861e79ecf126574c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 7, 2026.

Transparency log

Release files / metrotransit-0.1.2-py3-none-any.whl

Download URL metrotransit-0.1.2-py3-none-any.whl
Size 27.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
abf16ac0b81146c601730e5486f8a9f7c9200a141571eadb622c31b9ab1936c4
BLAKE2b-256 checksum
How to use checksums
190fa97574e893722bc8d3f3632255656a344946941fbad1b72f18319b25a849
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.0

2 release files

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