Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def transactions_filtered_in_python_code():
with profiled():
mysql_engine = create_engine('mysql://{0}:{1}@{2}/{3}'.format(user, pwd, host, db))
Session = sessionmaker(bind=mysql_engine)
session = Session()
transactions = session.query(Transactions).all()
return [(t.id, t.name, t.billing_type) for t in transactions if t.created_at == '2015-05-11' ]
transactions_filtered_in_python_code()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment