wmataio
wmataio is an easy to use Python interface to the Washington Metropolitan Area Transit Authority API (Washington, DC Public Transit).
Contents
Requirements
- Python 3.10
Installation
pip install wmataio
Usage
Getting Started
from wmataio import MetroRail, Station
client = MetroRail(api_key)
await client.load_data()
stations: dict[str, Station] = client.stations
lines: dict[str, Line] = client.lines
Design
wmataio breaks the WMATA API into two components: MetroRail and MetroBus.
MetroRail
Provides access to all MetroRail related endpoints.
Using MetroRail
import wmataio
client = wmataio.client(api_key)
trains = await client.rail.next_trains_at_station(client.rail.stations["A01"])
MetroBus
Provides access to all MetroBus related endpoints.
Using MetroBus
import wmataio
client = wmataio.client(api_key)
routes = await client.bus.get_all_routes()
Credits
Thanks to @emma-k-alexandra for pywmata which I used as the base for this repo.
License
wmataio is released under the MIT license. See LICENSE for details.
Metadata
Release files for pywmataio 0.0.8
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 |
|---|---|---|---|---|
| pywmataio-0.0.8.tar.gz | 23.1 kB | Without provenance | Details for pywmataio-0.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pywmataio-0.0.8-py3-none-any.whl | Python 3 | none | any | Details for pywmataio-0.0.8-py3-none-any.whl |
Total release size: 60.9 kB
Release files / pywmataio-0.0.8.tar.gz
| Download URL | pywmataio-0.0.8.tar.gz |
|---|---|
| Size | 23.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
685e19b9b26030236cf9c533b8367101191fbf4ad47a3b4de54a93c2e8f1ec45
|
|
BLAKE2b-256 checksum How to use checksums |
400f75360b15a57c4c1a9cc3ceb20bc8f110bd97368ad54ce31d59e6cc4775ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / pywmataio-0.0.8-py3-none-any.whl
| Download URL | pywmataio-0.0.8-py3-none-any.whl |
|---|---|
| Size | 37.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a8f43bd74ff853c8d0e9e6a776865e5dcad53786af42b4e72a85371b08d40e52
|
|
BLAKE2b-256 checksum How to use checksums |
ee2dbe04ec550e0201b76b6ab50a3ff0ed56d496e91e7daf421a2002721a6e3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Security for pywmataio 0.0.8
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.