A simple interface to the WMATA API
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wmata-1.0.0.tar.gz
(22.6 kB
view details)
Built Distribution
wmata-1.0.0-py3-none-any.whl
(28.4 kB
view details)
File details
Details for the file wmata-1.0.0.tar.gz
.
File metadata
- Download URL: wmata-1.0.0.tar.gz
- Upload date:
- Size: 22.6 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43315d254f10e19774eea8695a4ceb3271d294910ef42757b3dbd47f6d4bf420 |
|
MD5 | f2a5aa378c8dd60d0cabc7c48817d66c |
|
BLAKE2b-256 | 3bf3b097f54324b67721c94d3c83af146e460a45c48b944e7e5baeb1d9358d08 |
File details
Details for the file wmata-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: wmata-1.0.0-py3-none-any.whl
- Upload date:
- Size: 28.4 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39321d5ef88b204842410235592b53a03a97765b11fe4d6295112785dda051dd |
|
MD5 | 644fa7f2798ec976dd8fdf61beb13aaa |
|
BLAKE2b-256 | 4d191b0faa1fc948b75efe02da5c86493b3d8ca68b5f818d276374a293b58939 |