Skip to content
/ PyGRT Public

A Python wrapper for the GRT Realtime API

Notifications You must be signed in to change notification settings

s0i/PyGRT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyGRT v1.0.0

PyGRT is a thin API wrapper for the Grand River Transit Realtime API that isn't currently publicly documented. This is as much of the API as I could reverse-engineer/find in their public app.

Install

To install PyGRT:

  pip install pygrt

Or:

  python setup.py install

Usage

Currently there is no rate-limiting but the GPS data is updated every 30 seconds so retrieving data any faster than that is unecessary.

  from pygrt import GRT

  grt = GRT()

  # Get all current bus information
  print(grt.bus.all())
  
  # Get bus info
  print(grt.bus.info(bus_id, trip_id)
  
  # Get route polyline shape
  print(grt.route.shape(route_id)
  
  # Get stops for route
  print(grt.route.stops(route_id))

About

A Python wrapper for the GRT Realtime API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages