Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Torstack is a bundle for Tornado. it is designed to make getting started quick and easy, so you can focus on writing your app without needing to reinvent the wheel.

License

Notifications You must be signed in to change notification settings

longniao/torstack

Repository files navigation

Torstack

Travis CI Latest Version

Torstack is a bundle for Tornado. it is designed to make getting started quick and easy, so you can focus on writing your app without needing to reinvent the wheel.

Installing

Install and update using pip:

pip install -U torstack

A Simple Config

[application]
port : 8000
max_threads_num : 500
autoreload : True
settings = {
 'template_path' : 'website/template',
 'static_path' : 'website/static',
 'compress_response' : True,
 'cookie_secret' : '__cookie_secret__',
 'xsrf_cookies' : False,
 'login_url' : '/login',
 'debug' : True,
 'autoreload' : False
 }
log = {
 'log_level' : 'WARNING',
 'log_console' : False,
 'log_file' : True,
 'log_path' : '/tmp/logs',
 'when' : 'D',
 'interval' : '1',
 'backupCount' : '30'
 }

A Simple Example

import os
from tornado import gen
from torstack.server import TorStackServer
from torstack.handler.base import BaseHandler
class MainHandler(BaseHandler):
 def get(self):
 self.write("Hello, world")
def main():
 server = TorStackServer()
 server.config.load('./dev.conf')
 server.add_handlers([(r"/", MainHandler)])
 server.run()
if __name__ == "__main__":
 main()

Features

  • session
  • cookie
  • database
  • redis
  • taskmgr
  • websocket
  • smtp
  • elasticsearch

Python libraries

  • redis
  • aioredis
  • sqlalchemy
  • aiomysql
  • pymysql
  • asyncpg
  • motor
  • apscheduler
  • elasticsearch
  • psycopg2

About

Torstack is a bundle for Tornado. it is designed to make getting started quick and easy, so you can focus on writing your app without needing to reinvent the wheel.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /