Skip to content
A python (2/3) library for GTFS
Branch: master
Clone or download
jarondl Merge pull request #53 from jarondl/faster
Faster many to many inserts
Latest commit bbc2691 Feb 2, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
readthedocs.yml readthedocs: fix the build, move to yml config, get rid Nov 12, 2018
setup.cfg make wheels universal Apr 13, 2016


Travis PyPI


pygtfs is a library that models information stored in Google's General Transit Feed Specification (GTFS) format. GTFS is a format designed to specify information about a transit system, such as a city's subways or a private company's bus services. pygtfs stores information in an SQLite database using SQLAlchemy to facilitate the storage of Python objects in a relational database.

pygtfs is a fork of @eoghanmurray's fork of a @andrewblim's gtfs-sql which is a fork of @bmander's gtfs. See the git logs for more fun history.

License: MIT, included in license.txt.


  • SQLAlchemy 0.7.8. Used for all mapping of GTFS objects to the relational DB. You'll need to be familiar with it to read the code; the documentation is pretty solid.
  • pytz 2012d. A few GTFS fields are expected to be in a tz time zone format.
  • six. Used in order to support python2 and python3 in a single code base.
  • docopt. Pythonic command line arguments parser, that will make you smile


Get setuptools if you don't have it, clone the repo, and use python install.


Hosted on


  • Improve testing; add some unit testing framework and test with a variety of GTFS data feeds.
  • Add more docs

Why fork?

  • natively support several gtfs feeds per database
  • less SLOC, more DRY
  • add python3 support
  • renamed to a more generic name
  • will continue to maintain
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.