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:
- Install Python 2.7, easy_install and buildout on your system...
- git clone https://github.com/OpenTransitTools/gtfsdb_realtime.git
- cd gtfsdb_realtime
- buildout (note: if you're using postgres, do a 'buildout install prod pg')
Run TriMet example:
- get a TriMet api key: http://developer.trimet.org/appid/registration/
- bin/gtfsdb-rt-loader -a TRIMET -d postgresql+psycopg2://ott@127.0.0.1:5432/ott --apikey -c ### NOTE: create rt tables and populate all services
- 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