Skip to content

Instantly share code, notes, and snippets.

@infinite-Joy
Created June 14, 2017 08:18
Show Gist options
  • Save infinite-Joy/d1227f977186672d883faf78bc5bbcfb to your computer and use it in GitHub Desktop.
Save infinite-Joy/d1227f977186672d883faf78bc5bbcfb to your computer and use it in GitHub Desktop.
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