Skip to main content

flask-restless adopted for tornado

Project description


Inspired on flask-restless this is a sqlalchemy restless api wrapper for tornado.

Flask-Restless provides a ReSTful JSON API for sqlalchemy.

Due to the fact that I'm a tornado fan I adapted Lincoln de Sousa's and Jeffrey Finkelstein's great library for using with tornado.

In many details this implementation follows the documentation of Flask-Restless:

However there are some restrictions that are currently not implemented (like processors) or are slightly differ.

A autogenerated (using sphinx) version of the documentation for tornado-restless can be found at

Copyright license

flask-restless was dual licensed under the GNU Affero General Public License and 3-clause BSD License.

tornado-restless is dual licences under the GNU Affero General Public License or the 3-clause BSD License.
For more information see the [LICENSE.AGPL.txt] or [LICENSE.BSD.txt].


tornado-restless was developed under python3.3, sqlalchemy0.9 and tornado3.1

To install this library as an egg use:

python install


import tornado.ioloop
import tornado.web

from tornado_restless import ApiManager
from sqlalchemy import create_engine, schema, Column
from sqlalchemy.types import Integer, String
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base

# Init Tornado Application
application = tornado.web.Application([])

# Init SQLAlchemy
engine = create_engine('sqlite:///:memory:')
metadata = schema.MetaData()
Session = sessionmaker(bind=engine)
Base = declarative_base(metadata=metadata)
session = Session()

# Create some model
class Person(Base):
__tablename__ = 'persons'

id = Column(Integer, primary_key=True)
name = Column(String, unique=True)


# Create restless api handlers
api = ApiManager(application=application, session_maker=Session)

if __name__ == "__main__":

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
Tornado-Restless-0.4.5.tar.gz (28.0 kB) Copy SHA256 hash SHA256 Source None Aug 13, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page