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(...)
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) orNonesync_detailed: Blocking request that always returns aRequest, optionally withparsedset if the request was successful.asyncio: Likesyncbut async instead of blockingasyncio_detailed: Likesync_detailedbut 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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| metrotransit-0.1.2.tar.gz | 11.8 kB | With provenance | Details for metrotransit-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| metrotransit-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for metrotransit-0.1.2-py3-none-any.whl |
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 logRelease 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 logSecurity for metrotransit 0.1.2
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.
Attestation for metrotransit-0.1.2.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 Jan 7, 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.