Z
d d l Z d d l Z y d d l
Z Wn! e k
Do not import this module directly. Thanks to __init__.py you should do
something like:
import transitfeed
schedule = transitfeed.Schedule()
...
This module is a library to help you create, read and write Google
Transit Feed files. Refer to the feed specification, available at
http://code.google.com/transit/spec/transit_feed_specification.htm, for a
complete description how the transit feed represents a transit schedule. This
library supports all required parts of the specification but does not yet
support all optional parts. Patches welcome!
The specification describes several tables such as stops, routes and trips.
In a feed file these are stored as comma separeted value files. This library
represents each row of these tables with a single Python object. This object has
attributes for each value on the row. For example, schedule.AddStop returns a
Stop object which has attributes such as stop_lat and stop_name.
Schedule: Central object of the parser
GenericGTFSObject: A base class for each of the objects below
Route: Represents a single route
Trip: Represents a single trip
Stop: Represents a single stop
ServicePeriod: Represents a single service, a set of dates
Agency: Represents the agency in this feed
Transfer: Represents a single transfer rule
TimeToSecondsSinceMidnight(): Convert HH:MM:SS into seconds since midnight.
FormatSecondsSinceMidnight(s): Formats number of seconds past midnight into a string
Optionally encode text and return it. The result should be safe to print.
an exception object for each problem. Subclasses must implement
Args:
file_name: string
row_num: int
row: list of strings
headers: list of column headers, its order corresponding to row's
c
__module__t __doc__R
R R R R R R R R R R R! R7 R# R& |