Skip to main content
https://travis-ci.org/cfhamlet/os-tornado.svg?branch=master https://codecov.io/gh/cfhamlet/os-tornado/branch/master/graph/badge.svg PyPI - Python Version PyPI

A framework to organize tornado project and simplify development.

Install

pip install os-tornado

Usage

  • Create project

    os-tornado startproject new_project

    Will create a project structure:

    new_project/
    ├── app
    │   ├── extensions
    │   │   ├── example_extension.py
    │   │   ├── __init__.py
    │   ├── request_handlers
    │   │   ├── example_handler.py
    │   │   ├── __init__.py
    │   ├── __init__.py
    │   ├── settings.py
    └── manager.py
  • Write your extensions and request handlers

  • Configure settings (app/settings.py)

  • Run server

    python manager.py runserver

Advanced Usage

  • os_tornado.decorators.jsonify

    jsonify returned dict and raised HTTPError

    example:

    @jsonify
    class ExampleHandler(RequestHandler):
    
        def get(self, *args, **kwargs):
            return {'status':'ok'}
    
        def post(self, *args, **kwargs):
            raise HTTPHandler(405)

Unit Tests

$ tox

License

MIT licensed.

Download files

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

Source Distribution

os-tornado-0.3.0.tar.gz (18.2 kB view details)

Uploaded Source

File details

Details for the file os-tornado-0.3.0.tar.gz.

File metadata

  • Download URL: os-tornado-0.3.0.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for os-tornado-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b8efff41f0f3c459474a7e04eec0f63e509a8aa86b4f3adbd3872f3784a64fcc
MD5 34e0ff2f6e2b8f28521c7828921304bb
BLAKE2b-256 2adc1850890d5357211bc2106caa3ce4ab84d32fa28e3afc6daeaf71f2016fe5

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.0 This release

1 file

0.2.2

1 file

0.2.0

1 file

0.1.7

1 file

0.1.6

1 file

0.1.5

1 file

0.1.4

1 file

0.1.3

1 file

0.1.2

1 file

0.1.1

1 file

0.1.0

1 file

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