def get_bus_trip_by_id(self, bus_trip_id): return db_session.query(BusTrip).filter_by(id=bus_trip_id).one()
def get_stops(self): return db_session.query(Stop).all()
from api.live_api import LiveApi from data.connectdb import db_session from data.models import Trip trip = db_session.query(Trip).filter_by(code='dst01').one() api = LiveApi()
def get_trip_by_code(self, code): return db_session.query(Trip).filter_by(code=code).one()
def get_trip_by_id(self, id): return db_session.query(Trip).filter_by(id=id).one()
def get_trips(self): return db_session.query(Trip).all()
def get_routes(self): return db_session.query(RouteTo).all()
def get_services(self): return db_session.query(Service).all()