The schedule module¶
-
class
pygtfs.schedule.
Schedule
(db_connection)[source]¶ 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. -
agencies
¶ A list of
pygtfs.gtfs_entities.Agency
objects
-
agencies_by_id
(id)¶ A list of
pygtfs.gtfs_entities.Agency
objects with matching id
-
agencies_query
¶ A
sqlalchemy.orm.Query
object to fetchpygtfs.gtfs_entities.Agency
objects
-
fare_rules
¶ A list of
pygtfs.gtfs_entities.FareRule
objects
-
fare_rules_query
¶ A
sqlalchemy.orm.Query
object to fetchpygtfs.gtfs_entities.FareRule
objects
-
fares
¶ A list of
pygtfs.gtfs_entities.Fare
objects
-
fares_by_id
(id)¶ A list of
pygtfs.gtfs_entities.Fare
objects with matching id
-
fares_query
¶ A
sqlalchemy.orm.Query
object to fetchpygtfs.gtfs_entities.Fare
objects
-
feed_infos
¶ A list of
pygtfs.gtfs_entities.FeedInfo
objects
-
feed_infos_query
¶ A
sqlalchemy.orm.Query
object to fetchpygtfs.gtfs_entities.FeedInfo
objects
-
feeds
¶ A list of
pygtfs.gtfs_entities.Feed
objects
-
feeds_by_id
(id)¶ A list of
pygtfs.gtfs_entities.Feed
objects with matching id
-
feeds_query
¶ A
sqlalchemy.orm.Query
object to fetchpygtfs.gtfs_entities.Feed
objects
-
frequencies
¶ A list of
pygtfs.gtfs_entities.Frequency
objects
-
frequencies_query
¶ A
sqlalchemy.orm.Query
object to fetchpygtfs.gtfs_entities.Frequency
objects
-
routes
¶ A list of
pygtfs.gtfs_entities.Route
objects
-
routes_by_id
(id)¶ A list of
pygtfs.gtfs_entities.Route
objects with matching id
-
routes_query
¶ A
sqlalchemy.orm.Query
object to fetchpygtfs.gtfs_entities.Route
objects
-
service_exceptions
¶ A list of
pygtfs.gtfs_entities.ServiceException
objects
-
service_exceptions_by_id
(id)¶ A list of
pygtfs.gtfs_entities.ServiceException
objects with matching id
-
service_exceptions_query
¶ A
sqlalchemy.orm.Query
object to fetchpygtfs.gtfs_entities.ServiceException
objects
-
services
¶ A list of
pygtfs.gtfs_entities.Service
objects
-
services_by_id
(id)¶ A list of
pygtfs.gtfs_entities.Service
objects with matching id
-
services_query
¶ A
sqlalchemy.orm.Query
object to fetchpygtfs.gtfs_entities.Service
objects
-
shapes
¶ A list of
pygtfs.gtfs_entities.ShapePoint
objects
-
shapes_query
¶ A
sqlalchemy.orm.Query
object to fetchpygtfs.gtfs_entities.ShapePoint
objects
-
stop_times
¶ A list of
pygtfs.gtfs_entities.StopTime
objects
-
stop_times_query
¶ A
sqlalchemy.orm.Query
object to fetchpygtfs.gtfs_entities.StopTime
objects
-
stops
¶ A list of
pygtfs.gtfs_entities.Stop
objects
-
stops_by_id
(id)¶ A list of
pygtfs.gtfs_entities.Stop
objects with matching id
-
stops_query
¶ A
sqlalchemy.orm.Query
object to fetchpygtfs.gtfs_entities.Stop
objects
-
transfers
¶ A list of
pygtfs.gtfs_entities.Transfer
objects
-
transfers_query
¶ A
sqlalchemy.orm.Query
object to fetchpygtfs.gtfs_entities.Transfer
objects
-
translations
¶ A list of
pygtfs.gtfs_entities.Translation
objects
-
translations_query
¶ A
sqlalchemy.orm.Query
object to fetchpygtfs.gtfs_entities.Translation
objects
-
trips
¶ A list of
pygtfs.gtfs_entities.Trip
objects
-
trips_by_id
(id)¶ A list of
pygtfs.gtfs_entities.Trip
objects with matching id
-
trips_query
¶ A
sqlalchemy.orm.Query
object to fetchpygtfs.gtfs_entities.Trip
objects
-