The schedule module¶
- class pygtfs.schedule.Schedule(db_connection)¶
Represents the full database.
The schedule is the most important object in pygtfs. It represents the entire dataset. Most of the properties come straight from the gtfs reference. Two of them were renamed: calendar is called services, and calendar_dates service_exceptions. One addition is the feeds table, which is here to support more than one feed in a database.
Each of the properties is a list created upon access by sqlalchemy. Then, each element of the list as attributes following the gtfs reference. In addition, if they are related to another table, this can also be accessed by attribute.
Parameters: db_conection – Either a sqlalchemy database url or a filename to be used with sqlite.
Delete a feed from a database by feed id
A list of pygtfs.gtfs_entities.ServiceException objects with matching id