WMATA
WMATA is an easy to use Python interface to the Washington Metropolitan Area Transit Authority API.
Contents
Requirements
- Python 3.8
Installation
pip install wmata
Usage
Getting Started
from wmata import MetroRail, Station
client = MetroRail(api_key)
trains = client.next_trains(Station["A01"])
Design
WMATA breaks the WMATA API into two components: MetroRail and MetroBus.
MetroRail
Provides access to all MetroRail related endpoints.
Using MetroRail
import wmata
client = wmata.MetroRail(api_key)
trains = client.next_trains(wmata.Station["A01"])
MetroBus
Provides access to all MetroBus related endpoints.
Using MetroBus
from wmata import MetroBus
client = MetroBus(api_key)
routes = client.routes()
Testing
Run
python setup.py test
Tests use VCRpy to avoid network requests.
Dependencies
- Requests
Dev Dependencies
- VCRpy
Contact
Feel free to email questions and comments to emma@emma.sh
License
WMATA is released under the MIT license. See LICENSE for details.
Metadata
Release files for wmata 1.0.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 | |
|---|---|---|---|
| wmata-1.0.0.tar.gz | 22.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wmata-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 51.0 kB
Release files / wmata-1.0.0.tar.gz
| Download URL | wmata-1.0.0.tar.gz |
|---|---|
| Size | 22.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
43315d254f10e19774eea8695a4ceb3271d294910ef42757b3dbd47f6d4bf420
|
|
BLAKE2b-256 checksum How to use checksums |
3bf3b097f54324b67721c94d3c83af146e460a45c48b944e7e5baeb1d9358d08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0
|
Release files / wmata-1.0.0-py3-none-any.whl
| Download URL | wmata-1.0.0-py3-none-any.whl |
|---|---|
| Size | 28.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
39321d5ef88b204842410235592b53a03a97765b11fe4d6295112785dda051dd
|
|
BLAKE2b-256 checksum How to use checksums |
4d191b0faa1fc948b75efe02da5c86493b3d8ca68b5f818d276374a293b58939
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0
|