- PostgreSQL (PostGIS for Geo tables) - preferred
- SQLite - not tested yet
- Oracle - not tested yet
- MySQL - not tested yet
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 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')
- get a TriMet api key: http://developer.trimet.org/appid/registration/
- bin/gtfsdb-rt-loader -a TRIMET -d postgresql+psycopg2://[email protected]:5432/ott --api_key -c ### NOTE: create rt_ tables and populate all services
- bin/gtfsdb-rt-loader -a TRIMET -d postgresql+psycopg2://[email protected]: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