Skip to content

OpenTransitTools/gtfsdb_realtime

Repository files navigation

GTFSDB Realtime

Supported Databases

  • PostgreSQL (PostGIS for Geo tables) - preferred
  • SQLite - not tested yet
  • Oracle - not tested yet
  • MySQL - not tested yet

GTFS REALTIME (General Transit Feed Specification) Database

Python code that will load GTFS-realtime data into a relational database, and SQLAlchemy ORM bindings to the GTFS tables in the gtfsdb. See https://developers.google.com/transit/gtfs-realtime/

Install and use via the gtfsdb source tree:

  1. Install Python 2.7, easy_install and buildout on your system...
  2. git clone https://github.com/OpenTransitTools/gtfsdb_realtime.git
  3. cd gtfsdb_realtime
  4. buildout (note: if you're using postgres, do a 'buildout install prod pg')

Run TriMet example:

  1. get a TriMet api key: http://developer.trimet.org/appid/registration/
  2. bin/gtfsdb-rt-loader -a TRIMET -d postgresql+psycopg2://ott@127.0.0.1:5432/ott --api_key -c ### NOTE: create rt_ tables and populate all services
  3. bin/gtfsdb-rt-loader -a TRIMET -d postgresql+psycopg2://ott@127.0.0.1:5432/ott --api_key -t None -v null ### NOTE: just update the Alerts data (skip trip and vehicle updates)

TODO: to get the route_short_names into the db right now (for alerts), have to run -c (create tables) cd ~/loader; bin/gtfsrt-load -d loc -a trimet -ak B393B2CE96A258A72BAB481CA -turl null -c

About

Real-time GTFS database loader and ORM library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published