Created
April 11, 2014 12:02
-
-
Save msaisushma/10462512 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import Column, Integer, String | |
Base = declarative_base() | |
class BusRoute(Base): | |
__tablename__ = 'busroutes' | |
bus_no = Column(Integer, primary_key=True) | |
start_point = Column(String(100)) | |
end_point = Column(String(100)) | |
route = Column(String(200)) | |
def __businfo__(self): | |
return "<BusClass(start_point='%s', end_point='%s', route='%s')>" % ( | |
self.start_point, self.end_point, self.route) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I dont see any problem with this.