Thanks to NextBus, I created a python package to make a bus reminder project!!!!

80 views
Skip to first unread message

Dale Nguyen

unread,
Jul 19, 2019, 2:39:29 PM7/19/19
to NextBus API Discussion

How it works


Every morning, before going out of the house, I have to send a message to TTC or check Google Maps to see when the bus will come.


I'm bored with this mundane task, so I wrote a bus scheduler to send me an iMessage to notify when the bus will come, I can have time to prepare.


If you are not using TTC, check the your bus provider from NextBus


Install bustracker package


pip install bustracker

Get the bus preditions


from bustracker import BusTracker
# Agency list is from http://webservices.nextbus.com/service/publicXMLFeed?command=agencyList
agency = 'ttc'
bus = BusTracker(agency)

# get prediction for bus stops
stops = [
    {'routeTag': 506, 'stopTag': 3292}
]

predictions = bus.get_predictions(stops)

print(predictions)



Detail of the project, can be found on github.


It would be nice if you want to help to improve this project by creating feature requests or pull request.


Reply all
Reply to author
Forward
0 new messages