Skip to main content

A point-in-time mirror of Washington DC Metro's realtime train schedule

Project description

# WMATA Realtime Snapshot

### Overview

Provide a point-in-time mirror of Washington DC Metro's realtime train schedule

### Installation

1. **Install the package**

pip install django-wmata-realtime-snapshot

1. **Add the app to your django project's settings**


1. **Get a WMATA API key**

If you don't already have a WMATA API account, sign up here:

Alternatively, you may have success using the demo key provided here:

Once you have a key, (e.g. `1234IAMAKEY`), you can use it to download a dump of the realtime data.

1. **Download a JSON and/or XML dump from WMATA**

These instructions are for a UNIX based system.

JSON Dump:
curl > realtime_dump.json

XML Dump:
curl > realtime_dump.xml

To download both at the same time:

curl > realtime_dump.json & curl > realtime_dump.xml

1. **Add your dumps to the Django settings file**

In your Django settings, define the following variables for the dumps you want to serve.


Any endpoint type (json or xml) that does not have a dump file to read will return a json/xml error message when querying the snapshot API:

{"Error": "No JSON resource has been defined. Please read the installation instructions."}

<Error>No XML resource has been defined. Please read the installation instructions.</Error>

1. **Add a url endpoint**

url(r'^mirror/', include('wmata_realtime_snapshot.urls', namespace='wmata_realtime_snapshot')),

1. **Visit the API**

The API path is the same as the real WMATA API for easy plug-n-play:


Project details

Release history Release notifications

This version
History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django-wmata-realtime-snapshot-0.2.tar.gz (3.3 kB) Copy SHA256 hash SHA256 Source None Jan 8, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page