Skip to content

Instantly share code, notes, and snippets.

@douglasgoodwin
Created January 12, 2012 21:34
Show Gist options
  • Save douglasgoodwin/1603277 to your computer and use it in GitHub Desktop.
Save douglasgoodwin/1603277 to your computer and use it in GitHub Desktop.
This gist loads GTFS data into a sqlite table
from datetime import date, datetime
import time
import numpy
from fish import ProgressFish
import gtfs
from gtfs import Schedule
from gtfs.types import TransitTime
from gtfs.entity import StopTime, Trip, Stop, Route, ServiceException, ServicePeriod, Agency
from sqlalchemy import *
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.schema import Column
from sqlalchemy.orm import sessionmaker
from sqlalchemy.types import String, Integer, Float, Date, Boolean
from sqlalchemy import distinct, exc, update
"""
Note: this document assumes that the GTFS data is available in a SQL
table with the same column names as provided in the comma separated text
files.
"""
class glbls():
stoptype_list = []
stoproute_list = []
stoptime_list = []
lastInsert = 0
DEBUG=True
Base = declarative_base()
start = time.time()
# put the counter lists in the global namespace
for i in range (0,200):
dynstoptimelist ="stoptime_list%d" %(i)
globals()[dynstoptimelist]=[]
# see http://stackoverflow.com/questions/1145905/scanning-huge-tables-with-sqlalchemy-using-the-orm
def page_query(q):
offset = 0
while True:
for elem in q.limit(1000).offset(offset):
r = True
yield elem
offset += 1000
if not r:
break
r = False
def make_boolean(value):
if (DEBUG): print "DEBUG: make_boolean(%s)" %value
if value == '':
return None
elif value not in ['0', '1', True, False]:
raise ValueError
else:
return bool(int(value))
def make_date(value):
if (DEBUG): print "DEBUG: make_date(%s)" %value
try:
return date(int(value[0:4]), int(value[4:6]),int(value[6:8]))
except:
# make_date(2011-12-04)
return date(int(value[0:4]), int(value[5:7]),int(value[8:10]))
def make_time(value):
return TransitTime(value)
class Entity():
def __init__(self, **kwargs):
for k, v in kwargs.items():
# if (DEBUG): print "k:%s, v:%s" %(k, v)
if v == '' or v is None:
v = None
elif hasattr(self, 'inbound_conversions') and k in self.inbound_conversions:
v = self.inbound_conversions[k](v)
setattr(self, k, v)
class CalendarDate(Entity, Base):
"""
NOTE Dates will be reformatted from YYYYMMDD to YYYY-MM-DD
"""
__tablename__ = "calendar_dates"
#
# _id = Column(Integer, primary_key=True, nullable=False, unique=True, autoincrement=True)
service_id = Column(String, primary_key=True, nullable=False)
date = Column(String, primary_key=True, nullable=False)
exception_type = Column(Integer, nullable=False)
#
inbound_conversions = {'exception_type': int}
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
data = repr(self.date), repr(self.exception_type)
return "CalendarDate(date=%s, exception_type=%s)" %(data)
# let's go!
if DEBUG: print "Load metro_gtfs.db"
sched = Schedule( "metro_gtfs.db" )
# copy the ServiceException s over to calendar_dates
gtfs_e = create_engine('sqlite:///metro_gtfs.db')
Base.metadata.create_all(gtfs_e)
Session = sessionmaker()
# let's write to the new Axiom db
Session.configure(bind=gtfs_e)
session_gtfs = Session()
exceptions = session_gtfs.query(CalendarDate).all()
session_gtfs.flush()
# axiom tables
"""
stop_times data processing will be more complex. The data will be stored in many different
tables to reduce storage size. Additionally, other tables will have to be updated during and after
stop_times data processing.
There will be approximately 300 primary tables that will store only store 'departure_time' and
'stop_id'.
CREATE TABLE stop_times[0-299] (
_id INTEGER PRIMARY KEY AUTOINCREMENT,
departure_time INT2,
stop_id INT2
);
If either 'pickup_type' or 'dropoff_type ' are non-zero, the data will be stored in a separate
table.
CREATE TABLE stop_type (
stop_row INTEGER,
table_index INT1,
data INT1
);
Since there are relatively few 'stop_headsign' values, they will be stored in a lookup table,
and referred to by their headsign_id.
CREATE TABLE key_headsign (
_id INTEGER PRIMARY KEY AUTOINCREMENT,
headsign_text TEXT NOT NULL
);
"""
from stoptimes import *
class AStopFeature(Entity, Base):
__tablename__ = 'stop_features'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True, autoincrement=True)
stop_id = Column(String, nullable=False, unique=True)
feature_type = Column(Integer)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
data = repr(self.stop_id), repr(self.feature_type)
return "AStopFeature(stop_id=%s, feature_type=%s)" %(data)
class AStop(Entity, Base):
"""
Note: assumes 'stop_id' and 'stop_code' will always be the same,
else use a key_stops as a lookup table similar to previous tables.
'stop_desc' and 'stop_url' not stored since they were empty. 'row_first'
and 'row_last' values will be entered after stop_times data has been
processed.
"""
__tablename__ = 'stops'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True, autoincrement=True)
stop_code = Column(String, nullable=False, unique=True)
stop_name = Column(String, )
stop_lat = Column(Float, nullable=False)
stop_lon = Column(Float, nullable=False)
row_first = Column(Integer, default=-1)
row_last = Column(Integer, default=-1)
# CREATE INDEX idx_stops_loc ON astops (stop_lat, stop_lon);
Index('idx_stops_loc', 'stop_lat', 'stop_lon'),
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
data = repr(self.stop_code), repr(self.stop_name), repr(self.stop_lat), repr(self.stop_lon)
return "AStop(stop_code=%s, stop_name=%s, stop_lat=%s, stop_lon=%s)" %(data)
class AStopChild(Entity, Base):
__tablename__ = 'stop_children'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True, autoincrement=True)
parent_stop = Column(Integer, ForeignKey("stops.stop_code"))
stop_code = Column(String, nullable=False, unique=True)
stop_name = Column(String, )
stop_lat = Column(Float, nullable=False)
stop_lon = Column(Float, nullable=False)
row_first = Column(Integer, default=-1)
row_last = Column(Integer, default=-1)
# CREATE INDEX idx_stops_loc ON astops (stop_lat, stop_lon);
Index('idx_stops_loc', 'stop_lat', 'stop_lon'),
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
data = repr(self.stop_code), repr(self.stop_name), repr(self.stop_lat), repr(self.stop_lon)
return "AStopChild(stop_code=%s, stop_name=%s, stop_lat=%s, stop_lon=%s)" %(data)
class ACalendar(Entity, Base):
__tablename__ = 'calendar'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True, autoincrement=True)
monday = Column(Boolean, nullable=False)
tuesday = Column(Boolean, nullable=False)
wednesday = Column(Boolean, nullable=False)
thursday = Column(Boolean, nullable=False)
friday = Column(Boolean, nullable=False)
saturday = Column(Boolean, nullable=False)
sunday = Column(Boolean, nullable=False)
start_date = Column(String, nullable=False)
end_date = Column(String, nullable=False)
#
# inbound_conversions = {'monday': make_boolean,'tuesday': make_boolean,'wednesday': make_boolean,'thursday': make_boolean,'friday': make_boolean,'saturday': make_boolean,'sunday': make_boolean}
#
def __init__(self, m=None,t=None,w=None,th=None,f=None,sa=None,su=None,start_date=None,end_date=None,):
self.monday = m
self.tuesday = t
self.wednesday = w
self.thursday = th
self.friday = f
self.saturday = sa
self.sunday = su
self.start_date = start_date
self.end_date = end_date
def __repr__(self):
data = repr(self.monday), repr(self.tuesday), repr(self.wednesday), repr(self.thursday), repr(self.friday), repr(self.saturday), repr(self.sunday), repr(self.start_date), repr(self.end_date)
return "ACalendar(monday=%s, tuesday=%s, wednesday=%s, thursday=%s, friday=%s, saturday=%s, sunday=%s, start_date=%s, end_date=%s)" %(data)
class ACalendarDate(Entity, Base):
__tablename__ = "calendar_dates"
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True, autoincrement=True)
service_id = Column(String)
date = Column(String)
exception_type = Column(Integer, nullable=False)
#
inbound_conversions = {'exception_type': int}
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
data = repr(self.service_id), repr(self.date), repr(self.exception_type)
return "ACalendarDate(service_id=%s, date=%s, exception_type=%s)" %(data)
class ATrip(Entity, Base):
"""
headsign_id, row_first, row_last will be entered after stop_times
data has been processed. block_id and shape_id are not currently used.
Previous key tables will be used to lookup and replace values from the
trips GTFS data.
"""
__tablename__ = "trips"
#
_id = Column(Integer, primary_key=True, unique=True, autoincrement=True)
route_id = Column(Integer)
service_id = Column(Integer)
headsign_id = Column(Integer)
row_first = Column(Integer)
row_last = Column(Integer)
#
inbound_conversions = {'exception_type': int}
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
data = repr(self.route_id), repr(self.service_id), repr(self.headsign_id)
return "ATrip(route_id=%s, service_id=%s, headsign_id=%s)" %(data)
class ARoute(Entity, Base):
__tablename__ = 'routes'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
route_short_name = Column(String)
route_long_name = Column(String)
route_desc = Column(String)
route_type = Column(Integer)
route_color = Column(Integer)
route_text_color = Column(Integer)
route_url = Column(String)
#
inbound_conversions = {'route_type': int}
#
def __init__(self, _id=None, route_short_name=None,route_long_name=None,route_desc=None,route_type=None,route_color=None,route_text_color=None,route_url="http://metro.net",):
self._id = _id
self.route_short_name = route_short_name
self.route_long_name = route_long_name
self.route_desc = route_desc
self.route_type = route_type
self.route_color = route_color
self.route_text_color = route_text_color
self.route_url = route_url
def __repr__(self):
data = repr(self._id), repr(self.route_short_name), repr(self.route_long_name), repr(self.route_desc), repr(self.route_type), repr(self.route_color), repr(self.route_text_color), repr(self.route_url)
return "ARoute(_id=%s, route_short_name=%s, route_long_name=%s, route_desc=%s, route_type=%s, route_color=%s, route_text_color=%s, route_url=%s)" %(data)
class StopType(Entity, Base):
__tablename__ = 'stop_type'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True, autoincrement=True)
stop_row = Column(Integer)
table_index = Column(Integer)
data = Column(Integer)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
dataa = repr(self.stop_row), repr(self.table_index), repr(self.data)
return "StopType(stop_row=%s, table_index=%s, data=%s)" %(dataa)
class StopRoute(Entity, Base):
__tablename__ = 'stop_route'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True, autoincrement=True)
route_id = Column(Integer)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
data = repr(self._id), repr(self.route_id)
return "StopRoute(_id=%s, route_id=%s)" %(data)
# KEY TABLES
class KeyStop(Entity, Base):
__tablename__ = 'key_stops'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True, autoincrement=True)
old_stop_id = Column(String, nullable=False, unique=True)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
data = repr(self._id), repr(self.old_stop_id)
return "KeyStop(_id=%s, old_stop_id=%s)" %(data)
class KeyTrip(Entity, Base):
__tablename__ = 'key_trips'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True, autoincrement=True)
old_trip_id = Column(String, nullable=False, unique=True)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
data = repr(self._id), repr(self.old_trip_id)
return "KeyTrip(_id=%s, old_trip_id=%s)" %(data)
class KeyRoute(Entity, Base):
__tablename__ = 'key_routes'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True, autoincrement=True)
old_route_id = Column(String, nullable=False, unique=True)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
data = repr(self._id), repr(self.old_route_id)
return "KeyRoute(_id=%s, old_route_id=%s)" %(data)
class KeyCalendar(Entity, Base):
__tablename__ = 'key_calendar'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True, autoincrement=True)
old_service_id = Column(String, nullable=False, unique=True)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
data = repr(self._id), repr(self.old_service_id)
return "KeyCalendar(_id=%s, old_service_id=%s)" %(data)
class KeyHeadsign(Entity, Base):
__tablename__ = 'key_headsign'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True, autoincrement=True)
headsign_text = Column(String, nullable=False, unique=True)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
data = repr(self._id), repr(self.headsign_text)
return "KeyHeadsign(_id=%s, headsign_text=%s)" %(data)
# we need to flatten these out!
# see http://stackoverflow.com/questions/406121/flattening-a-shallow-list-in-python
from itertools import chain
# retain key_headsign, we don't need the rest
key_headsign = list( chain.from_iterable( session_gtfs.query( distinct(StopTime.stop_headsign) ).all() ) )
key_trips = list( chain.from_iterable( session_gtfs.query( distinct(Trip.trip_id) ).all() ) )
key_routes = list( chain.from_iterable( session_gtfs.query( distinct(Route.route_id) ).all() ) )
key_calendar = list( chain.from_iterable( session_gtfs.query( distinct(ServicePeriod.service_id) ).all() ) )
key_stops = list( chain.from_iterable( session_gtfs.query( distinct(Stop.stop_id) ).all() ) )
# how do we strip the results out of a tuple?
# use the index method to get the offset for a value in the list
# key_routes.index(u'33-13050')
session_gtfs.flush()
elapsed = (time.time() - start)
print "minutes elapsed: %.2f" %(elapsed/60)
if DEBUG: print "Create the Axiom db..."
# let's open the AXIOM file now
t = datetime.now()
# start the timer
start = time.time()
mydb = 'sqlite:///axiom_%s.db' %(t.strftime("%Y_%m_%d_%H_%M_%S"))
axiom_e = create_engine(mydb)
Base.metadata.create_all(axiom_e)
Session_a = sessionmaker()
# let's write to the new Axiom db
Session_a.configure(bind=axiom_e)
session_axiom = Session_a()
session_axiom.flush()
# USE THE TABLES, not the lists to solve the off by one problems
if DEBUG: print "build the key tables"
if DEBUG: print "KeyHeadsign..."
end=len(key_headsign)
fish = ProgressFish(total= end-1)
for h,mmheadsign in enumerate(key_headsign):
fish.animate( amount=h )
if (mmheadsign):
mh=KeyHeadsign(headsign_text=mmheadsign)
session_axiom.add(mh)
try:
session_axiom.commit()
except exc.SQLAlchemyError as e:
if DEBUG: print "EXCEPTION committing key_headsign %s" %(e)
session_axiom.rollback()
session_axiom.flush()
elapsed = (time.time() - start)
print "minutes elapsed: %.2f" %(elapsed/60)
if DEBUG: print "key_stops..."
end=len(key_stops)
fish = ProgressFish(total= end-1 )
for h,mstop_id in enumerate(key_stops):
fish.animate( amount=h )
mt=KeyStop(old_stop_id=mstop_id)
session_axiom.add(mt)
try:
session_axiom.commit()
except exc.SQLAlchemyError as e:
if DEBUG: print "EXCEPTION committing key_stops %s" %(e)
session_axiom.rollback()
session_axiom.flush()
elapsed = (time.time() - start)
print "minutes elapsed: %.2f" %(elapsed/60)
if DEBUG: print "key_trips..."
end=len(key_trips)
fish = ProgressFish(total= end-1 )
for h,mtrip_id in enumerate(key_trips):
fish.animate( amount=h )
mt=KeyTrip(old_trip_id=mtrip_id)
session_axiom.add(mt)
try:
session_axiom.commit()
except exc.SQLAlchemyError as e:
if DEBUG: print "EXCEPTION committing key_trips %s" %(e)
session_axiom.rollback()
session_axiom.flush()
elapsed = (time.time() - start)
print "minutes elapsed: %.2f" %(elapsed/60)
if DEBUG: print "key_routes..."
end=len(key_routes)
fish = ProgressFish(total= end-1 )
for h,mroute_id in enumerate(key_routes):
fish.animate( amount=h )
rt=KeyRoute(old_route_id=mroute_id)
session_axiom.add(rt)
try:
session_axiom.commit()
except exc.SQLAlchemyError as e:
if DEBUG: print "EXCEPTION committing key_routes %s" %(e)
session_axiom.rollback()
session_axiom.flush()
elapsed = (time.time() - start)
print "minutes elapsed: %.2f" %(elapsed/60)
if DEBUG: print "key_calendar..."
end=len(key_calendar)
fish = ProgressFish(total= end-1 )
for h,mcal in enumerate(key_calendar):
fish.animate( amount=h )
mc=KeyCalendar(old_service_id=mcal)
session_axiom.add(mc)
try:
session_axiom.commit()
except exc.SQLAlchemyError as e:
if DEBUG: print "EXCEPTION committing key_calendar %s" %(e)
session_axiom.rollback()
session_axiom.flush()
elapsed = (time.time() - start)
print "minutes elapsed: %.2f" %(elapsed/60)
# update this data
if DEBUG: print "ACalendarDate exceptions..."
for k,exception in enumerate(exceptions):
l=k+1
kc = session_axiom.query(KeyCalendar).get(l)
if (kc):
_id = kc._id
try:
xc = ACalendarDate(service_id=_id, date=exception.date,exception_type=exception.exception_type)
# this isn't quite right -- maybe the key should be a concatenation of service_id and date?
session_axiom.add(xc)
except exc.SQLAlchemyError as e:
if DEBUG: print "EXCEPTION filling ACalendarDate exceptions %s" %(e)
pass
session_axiom.commit()
session_axiom.flush()
# now you can do this:
# session_axiom.query(ACalendarDate).all()
# session_axiom.query(ACalendarDate).all()[10].date
# session_axiom.query(ACalendarDate).all()[10].service_id
# session_axiom.query(ACalendarDate).all()[10].exception_type
elapsed = (time.time() - start)
print "minutes elapsed: %.2f" %(elapsed/60)
if DEBUG: print "Calendar..."
end = len(sched.service_periods)
fish = ProgressFish(total=end-1)
for k,svc in enumerate(sched.service_periods):
fish.animate( amount=k )
start_date = svc.start_date.strftime("%Y-%m-%d")
end_date = svc.end_date.strftime("%Y-%m-%d")
sp = ACalendar(m=svc.monday,t=svc.tuesday,w=svc.wednesday,th=svc.thursday,f=svc.friday,sa=svc.saturday,su=svc.sunday,start_date=start_date,end_date=end_date,)
session_axiom.add(sp)
try:
session_axiom.commit()
except exc.SQLAlchemyError as e:
if DEBUG: print "EXCEPTION committing Calendar %s" %(e)
session_axiom.rollback()
session_axiom.flush()
# now you can do this:
# session_axiom.query(ACalendar).all()
# session_axiom.query(ACalendar).all()[10].end_date
# session_axiom.query(ACalendar).all()[10]._id
elapsed = (time.time() - start)
print "minutes elapsed: %.2f" %(elapsed/60)
if DEBUG: print "Routes..."
end = len(sched.routes)
fish = ProgressFish(total=end-1)
for k,rte in enumerate(sched.routes):
l=k+1
fish.animate( amount=l )
kr = session_axiom.query(KeyRoute).get(l)
if (kr):
_id = kr._id
rt = ARoute(_id=_id,route_short_name=rte.route_short_name,route_long_name=rte.route_long_name,route_desc=rte.route_desc,route_url=rte.route_url,route_type=rte.route_type,route_color=rte.route_color,route_text_color=rte.route_text_color,)
# sched.service_for_date(datetime.date(2011, 6, 26))
# cd = ACalendarDate(service_id=svc.service_id,date=None,exception_type=,)
session_axiom.add(rt)
else:
print "can't get %s from KeyRoute" %(l)
try:
session_axiom.commit()
except exc.SQLAlchemyError as e:
if DEBUG: print "EXCEPTION committing Routes %s" %(e)
session_axiom.rollback()
session_axiom.flush()
# now you can do this:
# session_axiom.query(ARoute).all()
# session_axiom.query(ARoute).all()[10].route_short_name
# session_axiom.query(ARoute).all()[10]._id
elapsed = (time.time() - start)
print "minutes elapsed: %.2f" %(elapsed/60)
if DEBUG: print "Stops..."
end = len(sched.stops)
fish = ProgressFish(total=end-1)
for k,stop in enumerate(sched.stops):
fish.animate( amount=k )
try:
# is the stop_code an integer?
stopcode = int(stop.stop_code)
st = AStop(stop_code=stop.stop_code, stop_name=stop.stop_name, stop_lat=stop.stop_lat, stop_lon=stop.stop_lon)
except ValueError:
# put it in the stops table anyhow
st = AStop(stop_code=stop.stop_code, stop_name=stop.stop_name, stop_lat=stop.stop_lat, stop_lon=stop.stop_lon)
# strip the letter off the end
parentcode = stop.stop_code[:-1]
try:
# just in case the parent stop hasn't been entered yet
# NOTE--lat and long will be set to the CHILD VALUES!
st = AStop(stop_code=parentcode, stop_name=stop.stop_name, stop_lat=stop.stop_lat, stop_lon=stop.stop_lon)
except:
if (DEBUG): print "Parent %s already there" %(parentcode)
pass
if (DEBUG): print "child stop: %s" %(stop.stop_code)
st = AStopChild(stop_code=stop.stop_code, stop_parent=parentcode, stop_name=stop.stop_name, stop_lat=stop.stop_lat, stop_lon=stop.stop_lon)
session_axiom.add(st)
try:
session_axiom.commit()
except exc.SQLAlchemyError as e:
if DEBUG: print "EXCEPTION! %s" %(e)
session_axiom.rollback()
session_axiom.flush()
# now you can do this:
# session_axiom.query(AStop).all()
# session_axiom.query(AStop).all()[10].stop_code
# session_axiom.query(AStop).all()[10]._id
# session_axiom.query(AStop).all()[10].stop_lat
# session_axiom.query(AStop).all()[10].stop_lon
# session_axiom.query(AStop).all()[10].stop_name
elapsed = (time.time() - start)
print "minutes elapsed: %.2f" %(elapsed/60)
if DEBUG: print "Trips..."
end = len(sched.trips)
fish = ProgressFish(total=end-1)
for k,trip in enumerate(sched.trips):
fish.animate( amount=k )
route__id=None
service__id=None
if (trip.route_id):
try:
# route__id=key_routes.index(trip.route_id)+1
q = session_axiom.query(KeyRoute).filter_by(old_route_id=trip.route_id)
route__id = q.one()._id
except Exception, e:
if DEBUG: print "problem with trip.route_id %s EXCEPTION! %s" %(trip.route_id, e)
print "the query was: %s" %(q)
pass
else:
print "no trip.route_id!"
if (trip.service_id):
try:
# service__id=key_calendar.index(trip.service_id)+1
q = session_axiom.query(KeyCalendar).filter_by(old_service_id=trip.service_id)
service__id = q.one()._id
tr = ATrip(route_id=route__id,service_id=service__id)
session_axiom.add(tr)
except Exception, e:
# problem with trip.service_id JUNE10-009-3_Sunday-03 EXCEPTION! 'NoneType' object has no attribute '_id'
if DEBUG: print "problem with trip.service_id %s service__id of %s EXCEPTION! %s" %(trip.service_id, service__id, e)
print "the query was: %s" %(q)
pass
else:
print "no trip.service_id!"
try:
session_axiom.commit()
except exc.SQLAlchemyError as e:
if DEBUG: print "EXCEPTION! %s" %(e)
session_axiom.rollback()
"""
problem with trip.service_id JUNE10-009-3_Sunday-03 service__id of None EXCEPTION! No row was found for one()
the query was:
SELECT key_calendar._id AS key_calendar__id, key_calendar.old_service_id AS key_calendar_old_service_id
FROM key_calendar
WHERE key_calendar.old_service_id = :old_service_id_1
"""
session_axiom.flush()
# now you can do this:
# session_axiom.query(ATrip).all()
# session_axiom.query(ATrip).all()[10].route_id
# session_axiom.query(ATrip).all()[10].service_id
"""
Pseudocode for stop_times processing:
tableName[n] represents the nth row of table tableName
tableName[n].col represents the value in column col of the nth row of table tableName
void processStopTimes() {
boolean[][] stopRoutes = new boolean[numStops+1][numRoutes+1];
for(i = all GTFS_stop_times) {
int tripId = getTripId(GTFS_stop_times[i].trip_id);
int tableNum = tripId/256;
int stopId = getStopId(GTFS_stop_times[i].stop_id);
// write to stop_times<tableNum> table
String depTime = GTFS_stop_times[i].departure_time;
int departureTime = depTime.substr(HH) * 60 + depTime.substr(MM);
writeToStopTimes(tableNum, departureTime, stopId);
int lastInsert = stop_times<tableNum>.lastInsertRow();
// update stop_type table
int stop_type = GTFS_stop_time[i].pickup_type + 4*GTFS_stop_time[i].dropoff_type
if(stop_type != 0) {
writeToStopType(tableNum, lastInsert, stop_type);
}
// update trip data
if(trips[tripId].row_first == null) {
trips[tripId].row_first = lastInsert;
}
trips[tripId].row_last = lastInsert;
trips[tripId].trip_headsign = getHeadsignId(GTFS_stop_times[i].stop_headsign);
// update stop_route tracking
int routeId = trips[trip_id].route_id;
stopRoutes[stopId][routeId] = true;
}
// populate stop_route table and update stops table
for(s = all stops) {
for(r = all routes) {
if(stopRoutes[s][r] == true) {
writeToStopRoutes(r);
int lastInsert = stop_routes.lastInsertRow();
if(stops[s].row_first == null) {
stops[s].row_first = lastInsert;
}
stops[s].row_last = lastInsert;
}
}
}
}
int getStopId(String oldStopId) {
SELECT _id FROM stops WHERE stop_code == oldStopId;
}
int getTripId(String oldTripId) {
SELECT _id FROM key_trips WHERE old_trip_id == oldTripId;
}
int getHeadsignId(String headsignText) {
IF EXISTS (SELECT _id from key_headsign WHERE headsign_text == headsignText)
return _id;
ELSE
INSERT INTO key_headsign VALUES (null, headsignText);
return key_headsign.lastInsertRow();
}
void writeToStopTimes(int tableNum, int departureTime, int stopId) {
INSERT INTO stop_times<tableNum> VALUES (null, departureTime, stopId);
}
void writeToStopTypes(int tableNum, int rowId, int stopType) {
INSERT INTO stop_type VALUES (tableNum, rowId, stopType);
}
void writeToStopRoutes(int routeId) {
INSERT INTO stop_routes VALUES(routeId);
}
"""
def writeToStopType(tableNum, lastInsert, stop_type):
# INSERT INTO stop_type VALUES (tableNum, rowId, stopType)
glbls.stoptype_list.append(stop_type)
st = StopType(stop_row=lastInsert, table_index=tableNum, data=stop_type)
session_axiom.add(st)
# this is required before you can get the last row id
# session_axiom.commit()
return len(glbls.stoptype_list)
def writeToStopRoutes(routeId):
"""
After all stop_times have been processed, we will store the indexes of the true values in another table representing a jagged two dimensional array.
CREATE TABLE stop_routes (
_id INTEGER PRIMARY KEY AUTOINCREMENT,
route_id INT2
);
The rowid of the first and last rows of data for a particular stop will be stored in
row_first and row_last of stops.
"""
# INSERT INTO stop_routes VALUES(routeId)
glbls.stoproute_list.append(routeId)
st = StopRoute(route_id=routeId)
session_axiom.add(st)
return len(glbls.stoproute_list)
def writeToStopTimes(tableNum, departureTime, stopId):
"""
Writing the primary stop_times data
To determine what stop_times table data should be written to, we
take the GTFS_stop_times.trip_id and look up the corresponding
key_trips._id value. Divide by 256 to determine the table number to
write to (integer division).
Ex: trip._id 12345 data will be written to stop_times48
departure_time will be stored as an integer in minutes. Ex: 04:20:00
will be stored as 260 (4x60+20)
stop_id will be stored as the _id value corresponding to the
stop_code in the stops table.
If either the pickup_type or dropoff_type are not 0, a new row will
be added to the stop_type table where stop_row = rowid of the data added
to the stop_time<X> table, tableIndex = trip._id/256, and data =
(pickup_type + 4 * dropoff_type)
"""
dynstoptimelist ="stoptime_list%d" %(tableNum)
dynstoptimetable ="AStopTime%s" %(tableNum)
glbls.stoptime_list.append( (tableNum, departureTime, stopId) )
st = eval( "%s(departure_time=%s, stop_code=%s)" %(dynstoptimetable,departureTime,stopId) )
session_axiom.add(st)
# this is required before you can get the last row id
# session_axiom.commit()
# if (DEBUG): print stoptime_list
return len(glbls.stoptime_list)
numStops= len(key_stops)
numRoutes= len(key_routes)
stopRoutes = numpy.zeros(shape=(numStops+1,numRoutes+1))
session_axiom.flush()
elapsed = (time.time() - start)
print "minutes elapsed: %.2f" %(elapsed/60)
if DEBUG: print "Load the slices..."
end = session_gtfs.query(StopTime).count()
fish = ProgressFish(total=end-1)
i=0
for stoptime in session_gtfs.query(StopTime).yield_per(800):
# for stoptime in session_gtfs.query(StopTime).slice(0,1000):
fish.animate(amount=i)
i=i+1
tripId = session_axiom.query(KeyTrip).filter_by(old_trip_id=stoptime.trip_id).first()._id
tableNum = int( tripId/256 )
depTime = stoptime.departure_time
departureTime = (depTime.val/60)
stopId = session_axiom.query(KeyStop).filter_by(old_stop_id=stoptime.stop_id).first()._id
glbls.lastInsert = writeToStopTimes(tableNum, departureTime, stopId)
# update stop_type table
stop_type = int(stoptime.pickup_type) + ( 4*int(stoptime.drop_off_type) )
if (stop_type != 0):
writeToStopType(tableNum, glbls.lastInsert, stop_type)
#
# update trip data
try:
tripid_key = tripId
mytrip = session_axiom.query(ATrip).get(tripid_key)
if (mytrip):
try:
if (mytrip.row_first == None):
# if DEBUG: print "update trip id %s row_first = %s" %(tripid_key,lastInsert)
mytrip.row_first = glbls.lastInsert
except Exception, e:
if DEBUG: print "yo EXCEPTION! %s" %(e)
pass
try:
myheadsignid = session_axiom.query(KeyHeadsign).filter_by(headsign_text=stoptime.stop_headsign).first()._id
except Exception, e:
if DEBUG: print "mm EXCEPTION! %s" %(e)
pass
try:
mytrip.row_last = glbls.lastInsert
mytrip.headsign_id = myheadsignid
# session_axiom.commit()
except exc.SQLAlchemyError as e:
if DEBUG: print "EXCEPTION! %s" %(e)
session_axiom.rollback()
#
# update stop_route tracking
routeId = mytrip.route_id
# update the matrix
stopRoutes[stopId][routeId] = True
#
except Exception, e:
if DEBUG: print "huh EXCEPTION! %s" %(e)
pass
session_axiom.commit()
session_axiom.flush()
elapsed = (time.time() - start)
print "minutes elapsed: %.2f" %(elapsed/60)
# populate stop_route table and update stops table
key_aroutes = list( chain.from_iterable( session_axiom.query( distinct(ARoute._id) ).all() ) )
key_astops = list( chain.from_iterable( session_axiom.query( distinct(AStop._id) ).all() ) )
end = len(key_astops)
fish = ProgressFish(total=end-1)
for s,stopid in enumerate(key_astops):
fish.animate( amount=s )
for r,routeid in enumerate(key_aroutes):
if (stopRoutes[s][r] == True):
glbls.lastInsert = writeToStopRoutes(r)
mystop = session_axiom.query(AStop).get(s)
print "mystop.row_first is: %s" %(mystop.row_first)
if (mystop.row_first == -1):
try:
mystop.row_first = glbls.lastInsert
print "row_first': lastInsert = %s" %(glbls.lastInsert)
# session_axiom.commit()
except Exception as e:
if DEBUG: print "row_first bouffed. lastInsert is %s, EXCEPTION! %s" %(glbls.lastInsert,e)
session_axiom.rollback()
try:
print "row_last': lastInsert = %s" %(glbls.lastInsert)
mystop.row_last = glbls.lastInsert
except exc.SQLAlchemyError as e:
if DEBUG: print "row_last bouffed. EXCEPTION! %s" %(e)
session_axiom.rollback()
session_axiom.commit()
session_axiom.flush()
elapsed = (time.time() - start)
print "minutes elapsed: %.2f" %(elapsed/60)
# execute this arbitrary SQL
# CREATE INDEX idx_stops_loc ON astops (stop_lat, stop_lon);
# Index('idx_stops_loc', 'stop_lat', 'stop_lon'),
# DROP tables that are empty. HOW?
if (DEBUG):
print "stoptype_list is %s" %(glbls.stoptype_list)
print "stoproute_list is %s" %(glbls.stoproute_list)
"""
Lastly, we need to create an index on stops based on the station's location:
CREATE INDEX idx_stops_loc ON stops (stop_lat, stop_lon);
"""
DEBUG=True
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.schema import Column
from sqlalchemy.types import String, Integer, Float, Date, Boolean
"""
stop_times data processing will be more complex. The data will be stored in many different
tables to reduce storage size. Additionally, other tables will have to be updated during and after
stop_times data processing.
There will be approximately 300 primary tables that will store only store ‘departure_time’ and
‘stop_id’.
CREATE TABLE stop_times[0-299] (
_id INTEGER PRIMARY KEY AUTOINCREMENT,
departure_time INT2,
stop_id INT2
);
If either ‘pickup_type’ or ‘dropoff_type ‘ are non-zero, the data will be stored in a separate
table.
CREATE TABLE stop_type (
stop_row INTEGER,
table_index INT1,
data INT1
);
Since there are relatively few ‘stop_headsign’ values, they will be stored in a lookup table,
and referred to by their headsign_id.
CREATE TABLE key_headsign (
_id INTEGER PRIMARY KEY AUTOINCREMENT,
headsign_text TEXT NOT NULL
);
"""
Base = declarative_base()
class Entity():
def __init__(self, **kwargs):
for k, v in kwargs.items():
# if (DEBUG): print "k:%s, v:%s" %(k, v)
if v == '' or v is None:
v = None
elif hasattr(self, 'inbound_conversions') and k in self.inbound_conversions:
v = self.inbound_conversions[k](v)
setattr(self, k, v)
class AStopTime0(Entity, Base):
__tablename__ = 'stop_times0'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime0(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime1(Entity, Base):
__tablename__ = 'stop_times1'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime1(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime2(Entity, Base):
__tablename__ = 'stop_times2'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime2(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime3(Entity, Base):
__tablename__ = 'stop_times3'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime3(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime4(Entity, Base):
__tablename__ = 'stop_times4'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime4(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime5(Entity, Base):
__tablename__ = 'stop_times5'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime5(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime6(Entity, Base):
__tablename__ = 'stop_times6'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime6(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime7(Entity, Base):
__tablename__ = 'stop_times7'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime7(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime8(Entity, Base):
__tablename__ = 'stop_times8'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime8(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime9(Entity, Base):
__tablename__ = 'stop_times9'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime9(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime10(Entity, Base):
__tablename__ = 'stop_times10'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime10(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime11(Entity, Base):
__tablename__ = 'stop_times11'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime11(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime12(Entity, Base):
__tablename__ = 'stop_times12'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime12(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime13(Entity, Base):
__tablename__ = 'stop_times13'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime13(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime14(Entity, Base):
__tablename__ = 'stop_times14'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime14(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime15(Entity, Base):
__tablename__ = 'stop_times15'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime15(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime16(Entity, Base):
__tablename__ = 'stop_times16'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime16(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime17(Entity, Base):
__tablename__ = 'stop_times17'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime17(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime18(Entity, Base):
__tablename__ = 'stop_times18'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime18(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime19(Entity, Base):
__tablename__ = 'stop_times19'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime19(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime20(Entity, Base):
__tablename__ = 'stop_times20'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime20(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime21(Entity, Base):
__tablename__ = 'stop_times21'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime21(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime22(Entity, Base):
__tablename__ = 'stop_times22'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime22(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime23(Entity, Base):
__tablename__ = 'stop_times23'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime23(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime24(Entity, Base):
__tablename__ = 'stop_times24'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime24(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime25(Entity, Base):
__tablename__ = 'stop_times25'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime25(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime26(Entity, Base):
__tablename__ = 'stop_times26'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime26(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime27(Entity, Base):
__tablename__ = 'stop_times27'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime27(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime28(Entity, Base):
__tablename__ = 'stop_times28'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime28(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime29(Entity, Base):
__tablename__ = 'stop_times29'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime29(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime30(Entity, Base):
__tablename__ = 'stop_times30'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime30(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime31(Entity, Base):
__tablename__ = 'stop_times31'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime31(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime32(Entity, Base):
__tablename__ = 'stop_times32'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime32(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime33(Entity, Base):
__tablename__ = 'stop_times33'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime33(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime34(Entity, Base):
__tablename__ = 'stop_times34'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime34(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime35(Entity, Base):
__tablename__ = 'stop_times35'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime35(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime36(Entity, Base):
__tablename__ = 'stop_times36'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime36(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime37(Entity, Base):
__tablename__ = 'stop_times37'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime37(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime38(Entity, Base):
__tablename__ = 'stop_times38'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime38(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime39(Entity, Base):
__tablename__ = 'stop_times39'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime39(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime40(Entity, Base):
__tablename__ = 'stop_times40'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime40(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime41(Entity, Base):
__tablename__ = 'stop_times41'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime41(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime42(Entity, Base):
__tablename__ = 'stop_times42'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime42(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime43(Entity, Base):
__tablename__ = 'stop_times43'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime43(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime44(Entity, Base):
__tablename__ = 'stop_times44'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime44(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime45(Entity, Base):
__tablename__ = 'stop_times45'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime45(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime46(Entity, Base):
__tablename__ = 'stop_times46'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime46(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime47(Entity, Base):
__tablename__ = 'stop_times47'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime47(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime48(Entity, Base):
__tablename__ = 'stop_times48'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime48(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime49(Entity, Base):
__tablename__ = 'stop_times49'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime49(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime50(Entity, Base):
__tablename__ = 'stop_times50'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime50(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime51(Entity, Base):
__tablename__ = 'stop_times51'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime51(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime52(Entity, Base):
__tablename__ = 'stop_times52'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime52(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime53(Entity, Base):
__tablename__ = 'stop_times53'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime53(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime54(Entity, Base):
__tablename__ = 'stop_times54'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime54(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime55(Entity, Base):
__tablename__ = 'stop_times55'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime55(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime56(Entity, Base):
__tablename__ = 'stop_times56'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime56(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime57(Entity, Base):
__tablename__ = 'stop_times57'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime57(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime58(Entity, Base):
__tablename__ = 'stop_times58'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime58(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime59(Entity, Base):
__tablename__ = 'stop_times59'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime59(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime60(Entity, Base):
__tablename__ = 'stop_times60'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime60(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime61(Entity, Base):
__tablename__ = 'stop_times61'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime61(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime62(Entity, Base):
__tablename__ = 'stop_times62'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime62(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime63(Entity, Base):
__tablename__ = 'stop_times63'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime63(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime64(Entity, Base):
__tablename__ = 'stop_times64'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime64(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime65(Entity, Base):
__tablename__ = 'stop_times65'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime65(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime66(Entity, Base):
__tablename__ = 'stop_times66'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime66(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime67(Entity, Base):
__tablename__ = 'stop_times67'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime67(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime68(Entity, Base):
__tablename__ = 'stop_times68'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime68(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime69(Entity, Base):
__tablename__ = 'stop_times69'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime69(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime70(Entity, Base):
__tablename__ = 'stop_times70'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime70(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime71(Entity, Base):
__tablename__ = 'stop_times71'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime71(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime72(Entity, Base):
__tablename__ = 'stop_times72'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime72(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime73(Entity, Base):
__tablename__ = 'stop_times73'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime73(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime74(Entity, Base):
__tablename__ = 'stop_times74'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime74(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime75(Entity, Base):
__tablename__ = 'stop_times75'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime75(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime76(Entity, Base):
__tablename__ = 'stop_times76'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime76(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime77(Entity, Base):
__tablename__ = 'stop_times77'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime77(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime78(Entity, Base):
__tablename__ = 'stop_times78'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime78(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime79(Entity, Base):
__tablename__ = 'stop_times79'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime79(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime80(Entity, Base):
__tablename__ = 'stop_times80'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime80(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime81(Entity, Base):
__tablename__ = 'stop_times81'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime81(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime82(Entity, Base):
__tablename__ = 'stop_times82'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime82(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime83(Entity, Base):
__tablename__ = 'stop_times83'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime83(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime84(Entity, Base):
__tablename__ = 'stop_times84'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime84(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime85(Entity, Base):
__tablename__ = 'stop_times85'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime85(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime86(Entity, Base):
__tablename__ = 'stop_times86'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime86(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime87(Entity, Base):
__tablename__ = 'stop_times87'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime87(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime88(Entity, Base):
__tablename__ = 'stop_times88'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime88(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime89(Entity, Base):
__tablename__ = 'stop_times89'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime89(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime90(Entity, Base):
__tablename__ = 'stop_times90'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime90(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime91(Entity, Base):
__tablename__ = 'stop_times91'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime91(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime92(Entity, Base):
__tablename__ = 'stop_times92'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime92(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime93(Entity, Base):
__tablename__ = 'stop_times93'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime93(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime94(Entity, Base):
__tablename__ = 'stop_times94'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime94(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime95(Entity, Base):
__tablename__ = 'stop_times95'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime95(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime96(Entity, Base):
__tablename__ = 'stop_times96'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime96(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime97(Entity, Base):
__tablename__ = 'stop_times97'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime97(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime98(Entity, Base):
__tablename__ = 'stop_times98'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime98(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime99(Entity, Base):
__tablename__ = 'stop_times99'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime99(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime100(Entity, Base):
__tablename__ = 'stop_times100'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime100(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime101(Entity, Base):
__tablename__ = 'stop_times101'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime101(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime102(Entity, Base):
__tablename__ = 'stop_times102'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime102(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime103(Entity, Base):
__tablename__ = 'stop_times103'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime103(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime104(Entity, Base):
__tablename__ = 'stop_times104'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime104(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime105(Entity, Base):
__tablename__ = 'stop_times105'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime105(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime106(Entity, Base):
__tablename__ = 'stop_times106'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime106(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime107(Entity, Base):
__tablename__ = 'stop_times107'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime107(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime108(Entity, Base):
__tablename__ = 'stop_times108'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime108(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime109(Entity, Base):
__tablename__ = 'stop_times109'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime109(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime110(Entity, Base):
__tablename__ = 'stop_times110'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime110(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime111(Entity, Base):
__tablename__ = 'stop_times111'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime111(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime112(Entity, Base):
__tablename__ = 'stop_times112'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime112(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime113(Entity, Base):
__tablename__ = 'stop_times113'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime113(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime114(Entity, Base):
__tablename__ = 'stop_times114'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime114(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime115(Entity, Base):
__tablename__ = 'stop_times115'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime115(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime116(Entity, Base):
__tablename__ = 'stop_times116'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime116(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime117(Entity, Base):
__tablename__ = 'stop_times117'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime117(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime118(Entity, Base):
__tablename__ = 'stop_times118'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime118(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime119(Entity, Base):
__tablename__ = 'stop_times119'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime119(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime120(Entity, Base):
__tablename__ = 'stop_times120'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime120(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime121(Entity, Base):
__tablename__ = 'stop_times121'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime121(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime122(Entity, Base):
__tablename__ = 'stop_times122'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime122(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime123(Entity, Base):
__tablename__ = 'stop_times123'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime123(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime124(Entity, Base):
__tablename__ = 'stop_times124'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime124(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime125(Entity, Base):
__tablename__ = 'stop_times125'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime125(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime126(Entity, Base):
__tablename__ = 'stop_times126'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime126(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime127(Entity, Base):
__tablename__ = 'stop_times127'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime127(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime128(Entity, Base):
__tablename__ = 'stop_times128'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime128(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime129(Entity, Base):
__tablename__ = 'stop_times129'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime129(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime130(Entity, Base):
__tablename__ = 'stop_times130'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime130(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime131(Entity, Base):
__tablename__ = 'stop_times131'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime131(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime132(Entity, Base):
__tablename__ = 'stop_times132'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime132(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime133(Entity, Base):
__tablename__ = 'stop_times133'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime133(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime134(Entity, Base):
__tablename__ = 'stop_times134'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime134(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime135(Entity, Base):
__tablename__ = 'stop_times135'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime135(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime136(Entity, Base):
__tablename__ = 'stop_times136'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime136(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime137(Entity, Base):
__tablename__ = 'stop_times137'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime137(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime138(Entity, Base):
__tablename__ = 'stop_times138'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime138(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime139(Entity, Base):
__tablename__ = 'stop_times139'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime139(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime140(Entity, Base):
__tablename__ = 'stop_times140'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime140(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime141(Entity, Base):
__tablename__ = 'stop_times141'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime141(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime142(Entity, Base):
__tablename__ = 'stop_times142'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime142(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime143(Entity, Base):
__tablename__ = 'stop_times143'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime143(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime144(Entity, Base):
__tablename__ = 'stop_times144'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime144(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime145(Entity, Base):
__tablename__ = 'stop_times145'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime145(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime146(Entity, Base):
__tablename__ = 'stop_times146'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime146(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime147(Entity, Base):
__tablename__ = 'stop_times147'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime147(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime148(Entity, Base):
__tablename__ = 'stop_times148'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime148(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime149(Entity, Base):
__tablename__ = 'stop_times149'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime149(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime150(Entity, Base):
__tablename__ = 'stop_times150'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime150(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime151(Entity, Base):
__tablename__ = 'stop_times151'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime151(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime152(Entity, Base):
__tablename__ = 'stop_times152'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime152(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime153(Entity, Base):
__tablename__ = 'stop_times153'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime153(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime154(Entity, Base):
__tablename__ = 'stop_times154'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime154(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime155(Entity, Base):
__tablename__ = 'stop_times155'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime155(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime156(Entity, Base):
__tablename__ = 'stop_times156'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime156(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime157(Entity, Base):
__tablename__ = 'stop_times157'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime157(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime158(Entity, Base):
__tablename__ = 'stop_times158'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime158(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime159(Entity, Base):
__tablename__ = 'stop_times159'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime159(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
class AStopTime160(Entity, Base):
__tablename__ = 'stop_times160'
#
_id = Column(Integer, primary_key=True, nullable=False, unique=True)
departure_time = Column(Integer)
stop_code = Column(Integer, nullable=False)
#
def __init__(self, **kwargs):
Entity.__init__(self, **kwargs)
def __repr__(self):
return "AStopTime160(stop_code=%r,departure_time=%r)" % (self.stop_code,self.departure_time,)
@kietdlam
Copy link

uhh... What?

Are you sure this even works...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment