a python client that interacts with the bay area rapid transit api
Project description
Reuben Castelino - projectdelphai@gmail.com
Description
A simple python package that interacts with the [Bay Area Rapid Transit API](http://api.bart.gov/docs/overview/index.aspx).
Usage
install bart_api with:
git clone github.com/projectdelphai/bart/api sudo python setup.py install
To create a new object:
from bart_api import BartApi
bart = BartApi()
If you have your own API key (which you can get at the BART API website), you can use that instead of the default free one with:
bart = BartApi(“YOUR_API_KEY_HERE”)
To get the number of live trains:
live_trains = bart.number_of_trains()
To get the status of all elevators:
elevators_status = bart.elevator_status()
To run the tests to make sure everything is running well, run this command in the root directory:
python -m unittest discover
Todo
make method for delays
make method for stations
make method for arrival/destination estimations
make method for routes
upload package to pip
seamless development for others
Helping Out
1. Create an issue (optional) 1. Clone the codebase 1. Create a branch 1. Make your changes 1. Write tests 1. Merge branch 1. Make a pull request
Changelog
0.0.1 * working through advisory information part of api * designed structure for tests and packaging
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
File details
Details for the file bart_api-0.1-1.tar.gz.
File metadata
- Download URL: bart_api-0.1-1.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a227d09bc11761b56a21e32b6968d98f5498c432e7790ee07b39bd34533016a3
|
|
| MD5 |
96a91a3c5f9bc1bcc469c90d907e8c74
|
|
| BLAKE2b-256 |
ebd81d0f8b4541c115d13416f5bda57e77ccc47166a1ddcbe5c3a6b0965c9411
|