Hi everyone, I spend a lot of time working with Tornado and SQLAlchemy, so I recently wrote a small module that provides a set of helper functions to make SQLAlchemy usage easier in Tornado applications.
Source code - https://github.com/siddhantgoel/tornado-sqlalchemy PyPI - https://pypi.python.org/pypi/tornado-sqlalchemy The main thing it lets you do is wrap session.execute(query).count like objects into Future objects so that they can be yield-ed upon from Tornado code. There's also a function included (actually a context manager) which handles session setup/teardown so that you don't end up sharing sessions. This is not a full-blown-async library (I've tried here to not build an abstraction layer on *top* of Tornado and SQLAlchemy) but rather a small piece of code that - 1. makes async query execution (only) easier to handle with in Tornado 2. gets rid of boilerplate that most people end up writing when using Tornado with SQLAlchemy 3. provides a wrapper around declarative_base which should make it possible to hook alembic up in your application Anyway, I hope it's useful, and I'm looking forward to feedback! Thanks, Siddhant -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.