A python API to consume transit data from http://511.org.
Project description
511-transit
Python API to consume transit data from http://511.org.
In order to use this library, you will need to signup for a 511.org developer token.
Sample usage
from fiveoneone.route import Route
from fiveoneone.stop import Stop
token = "YOUR_DEVELOPER_TOKEN"
route = Route(token, "SFMTA", "45-Union Stockton", "45", True)
stop = Stop(token, "Union St and Buchanan St", "17056")
departures = stop.next_departures(route.code, "Outbound")
print "{} Outbound will arrive to {} in {} minutes".format(route.code, stop.name, departures.times[0])
# 45 Outbound will to Union St and Buchanan St in 5 minutes
- See the tests/test_integration.py for other usages.
Run the tests
requirements.dev.txt has all the requirements to run the tests. After that, from the repo root do to run all the available tests:
nosetests
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fiveoneone-0.6.0.tar.gz
(5.2 kB
view hashes)
Built Distribution
Close
Hashes for fiveoneone-0.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90f0e3eb1ce167d545211927e1f05f109226937cb0c46ad946a8813d8b472011 |
|
MD5 | b52d0fec17e78004a7ae6acdc0a6eb53 |
|
BLAKE2b-256 | 6fe67e9cc4167ec3c91ee264bf43eeac8c77b48f994a6ef8ff68c2fcb8f0a407 |