A simple interface to the WMATA API
WMATA is an easy to use Python interface to the Washington Metropolitan Area Transit Authority API.
- Python 3.8
pip install wmata
from wmata import MetroRail, Station client = MetroRail(api_key) trains = client.next_trains(Station["A01"])
WMATA breaks the WMATA API into two components:
Provides access to all MetroRail related endpoints.
import wmata client = wmata.MetroRail(api_key) trains = client.next_trains(wmata.Station["A01"])
Provides access to all MetroBus related endpoints.
from wmata import MetroBus client = MetroBus(api_key) routes = client.routes()
python setup.py test
Tests use VCRpy to avoid network requests.
Feel free to email questions and comments to email@example.com
WMATA is released under the MIT license. See LICENSE for details.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.