Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
user = 'root'
pwd = ''
host = 'localhost'
db = 'testing'
mysql_engine = create_engine('mysql://{0}:{1}@{2}/{3}'.format(user, pwd, host, db))
Base = declarative_base()
class Transactions(Base):
__tablename__ = 'transactions'
id = Column(Integer, primary_key=True)
name = Column(String)
description = Column(String)
country_name = Column(String)
city_name = Column(String)
cost = Column(String)
currency = Column(String)
created_at = Column(DateTime)
billing_type = Column(String)
language = Column(String)
operating_system = Column(String)
def __repr__(self):
"""How the class Transactions is shown.
:returns: return the string with the id and the name.
"""
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment