Skip to main content
tornado-restless
================

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:

https://flask-restless.readthedocs.org/en/latest/index.html

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 http://tornado-utils.github.io/tornado-restless/

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].

Installing
==========

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

To install this library as an egg use:

python setup.py install

Quickstart
==========

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)

metadata.create_all(engine)

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

if __name__ == "__main__":
application.listen(8888)
tornado.ioloop.IOLoop.instance().start()

Release files for Tornado-Restless 0.4.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Tornado-Restless 0.4.5
File Size Uploaded
Tornado-Restless-0.4.5.tar.gz 28.0 kB Details

Release files / Tornado-Restless-0.4.5.tar.gz

Download URL Tornado-Restless-0.4.5.tar.gz
Size 28.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d013496969325030d843a1a4c5762e05899902c7a6f307adbcd371d079e52082
BLAKE2b-256 checksum
How to use checksums
4715d3e4327d72808e7ad7ae3f166beeaf4c74b201ae03b16598c1197489a8d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.4.5 This release

1 release file

0.4.4

1 release file

0.4.3

0.4.1

0.4.0

0.2.0

0.1.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page