Skip to content
/ cta Public

A Python wrapper for interacting with the Chicago Transit Authority API Feeds

License

Notifications You must be signed in to change notification settings

joerex1418/cta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cta

A Python wrapper for interacting with the CTA Transit Feeds:

  • BusTrackerAPI
  • TrainTrackerAPI
  • CustomerAlertsAPI

Quick Start

import cta

# API Wrappers
bt = cta.BusTracker()
tt = cta.TrainTracker()

Stop Search / Reference

ss = cta.StopSearch()

# Search for stops with "fullerton" in stop name
ss.find_stop('fullerton')

# Same search but only return train stops (stations)
ss.find_stop('fullerton',stop_type='train')

# Search for the bus stop at the intersection of Clark & Diversey
ss.find_stop('clark and diversey',stop_type='bus')

Bus Tracking

# Arrival Predictions by stop ID

bt.predictions(stpid="1836")

# Arrival Predictions for a single vehicle (vehicle ID).

bt.predictions(stpid="1836")

About

A Python wrapper for interacting with the Chicago Transit Authority API Feeds

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages