PageRenderTime 146ms queryTime 34ms sortTime 0ms getByIdsTime 37ms findMatchingLines 21ms

100+ results results for 'sqlalchemy tornado' (146 ms)

Not the results you expected?
user.py https://bitbucket.org/paasmaker/paasmaker.git | Python | 321 lines
                    
18import colander
                    
19import tornado
                    
20import tornado.testing
                    
20import tornado.testing
                    
21import sqlalchemy
                    
22
                    
138				self.session.refresh(user)
                    
139			except sqlalchemy.exc.IntegrityError, ex:
                    
140				self.session.rollback()
                    
189		routes.extend(UserListController.get_routes({'configuration': self.configuration}))
                    
190		application = tornado.web.Application(routes, **self.configuration.get_tornado_configuration())
                    
191		return application
                    
                
Alerts.py https://gitlab.com/fdemian/Shelob | Python | 160 lines
                    
3from api.authentication.AuthenticatedHandler import AuthenticatedHandler
                    
4from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
                    
5from tornado.gen import coroutine
                    
                
tools.rst https://github.com/linuxnow/mongo-python-driver.git | ReStructuredText | 100 lines
                    
45  `MongoAlchemy <http://mongoalchemy.org>`_ is another ORM-like layer on top of
                    
46  PyMongo. Its API is inspired by `SQLAlchemy <http://sqlalchemy.org>`_. The
                    
47  code is available `on github <http://github.com/jeffjenkins/MongoAlchemy>`_;
                    
96* `asyncmongo <https://github.com/bitly/asyncmongo>`_ is an asynchronous library
                    
97  for accessing mongo which is built on the tornado ioloop.
                    
98* `TxMongo <http://github.com/fiorix/mongo-async-python-driver>`_ is an
                    
                
Story.py https://gitlab.com/fdemian/Shelob | Python | 113 lines
                    
1import json
                    
2from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
                    
3from api.model.models import Story
                    
4from api.authentication.AuthenticatedHandler import AuthenticatedHandler
                    
5from tornado.gen import coroutine
                    
6
                    
                
env.py https://gitlab.com/fdemian/Shelob | Python | 86 lines
                    
2from alembic import context
                    
3from sqlalchemy import engine_from_config, pool
                    
4from logging.config import fileConfig
                    
4from logging.config import fileConfig
                    
5from tornado.options import define, options, parse_config_file
                    
6
                    
52    """
                    
53    #url = config.get_main_option("sqlalchemy.url")
                    
54    url = get_database_url()
                    
69    config_section = config.get_section(config.config_ini_section)
                    
70    config_section["sqlalchemy.url"] = get_database_url()
                    
71    
                    
73        config_section,
                    
74        prefix='sqlalchemy.',
                    
75        poolclass=pool.NullPool)
                    
                
Comments.py https://gitlab.com/fdemian/Shelob | Python | 203 lines
                    
3from api.model.models import Story, Comment, Notification, User
                    
4from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
                    
5from api.authentication.AuthenticatedHandler import AuthenticatedHandler
                    
5from api.authentication.AuthenticatedHandler import AuthenticatedHandler
                    
6from tornado.gen import coroutine
                    
7import datetime
                    
                
createPlots.sh https://gitlab.com/wurssb/NG-Tax | Shell | 25 lines
                    
3#As galaxy runs in a virtual env the user python path is reset... therefor I (jasper) used this uqly hacky solution... (for now...)
                    
4PYTHONPATH=/home/QIIME_deploy/qiime_180/qiime-galaxy-0.0.1-repository-c2814c3c/lib/:/home/QIIME_deploy/qiime_180/qiime-1.8.0-release/lib/python2.7/site-packages:/home/QIIME_deploy/qiime_180/tax2tree-1.0-release/lib/python2.7/site-packages:/home/QIIME_deploy/qiime_180/biom-format-1.3.1-release/lib/python2.7/site-packages:/home/QIIME_deploy/qiime_180/pynast-1.2.2-release/lib/python2.7/site-packages:/home/QIIME_deploy/qiime_180/pprospector-1.0.1-release/lib/python2.7/site-packages:/home/QIIME_deploy/qiime_180/qiime-1.8.0-release/lib/:/home/QIIME_deploy/qiime_180/emperor-0.9.3-release/lib/python2.7/site-packages:/home/QIIME_deploy/qiime_180/matplotlib-1.3.1-release/lib/python2.7/site-packages:/home/QIIME_deploy/qiime_180/sphinx-1.0.4-release/lib/python2.7/site-packages:/home/QIIME_deploy/qiime_180/pyqi-0.3.1-release/lib/python2.7/site-packages:/home/QIIME_deploy/qiime_180/pycogent-1.5.3-release/lib/python2.7/site-packages:/home/QIIME_deploy/qiime_180/MySQL-python-1.2.3-release/lib/python2.7/site-packages:/home/QIIME_deploy/qiime_180/mpi4py-1.2.2-release/lib/python2.7/site-packages:/home/QIIME_deploy/qiime_180/setuptools-0.6c11-release/lib/python2.7/site-packages:/home/QIIME_deploy/qiime_180/gdata-2.0.17-release/lib/python2.7/site-packages:/home/QIIME_deploy/qiime_180/pysqlite-2.6.3-release/lib/python2.7/site-packages:/home/QIIME_deploy/qiime_180/tornado-3.1.1-release/lib/python2.7/site-packages:/home/QIIME_deploy/qiime_180/qcli-0.1.0-release/lib/python2.7/site-packages:/home/QIIME_deploy/qiime_180/ipython-latest-repository-126bd580/lib/python2.7/site-packages:/home/QIIME_deploy/qiime_180/pyzmq-2.1.11-release/lib/python2.7/site-packages:/home/QIIME_deploy/qiime_180/SQLAlchemy-0.7.1-release/lib/python2.7/site-packages:/home/QIIME_deploy/qiime_180/pysqlite-2.6.3-release/lib/:/home/QIIME_deploy/qiime_180/numpy-1.7.1-release/lib/python2.7/site-packages:
                    
5
                    
                
workspace.py https://bitbucket.org/paasmaker/paasmaker.git | Python | 403 lines
                    
19import colander
                    
20import tornado
                    
21import tornado.testing
                    
21import tornado.testing
                    
22import sqlalchemy.exc
                    
23
                    
58			if not workspace:
                    
59				raise tornado.web.HTTPError(404, "No such workspace.")
                    
60
                    
111				self.session.refresh(workspace)
                    
112			except sqlalchemy.exc.IntegrityError, ex:
                    
113				self.session.rollback()
                    
186		routes.extend(WorkspaceListController.get_routes({'configuration': self.configuration}))
                    
187		application = tornado.web.Application(routes, **self.configuration.get_tornado_configuration())
                    
188		return application
                    
                
GlobalOptions.py https://gitlab.com/fdemian/Shelob | Python | 118 lines
                    
1import json
                    
2from tornado.web import RequestHandler
                    
3from tornado.gen import coroutine
                    
4from api.model.models import GlobalConfiguration
                    
5# from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
                    
6
                    
                
setup.py https://bitbucket.org/bendikro/deluge-yarss-plugin.git | Python | 86 lines
                    
10
                    
11# Get the version (borrowed from SQLAlchemy)
                    
12with open(os.path.join(base_path, "src", "urllib3", "__init__.py")) as fp:
                    
71        "mock",
                    
72        "tornado",
                    
73    ],
                    
                
games.py https://gitlab.com/sphaso/weiqi.gs | Python | 397 lines
                    
16
                    
17from sqlalchemy.orm import undefer
                    
18from contextlib import contextmanager
                    
20from datetime import datetime
                    
21from tornado import gen
                    
22from weiqi import settings
                    
                
__init__.py https://github.com/thecowboy/apollo.git | Python | 103 lines
                    
30
                    
31from sqlalchemy.engine import create_engine
                    
32
                    
34
                    
35from tornado.options import define, options, parse_config_file, parse_command_line
                    
36from tornado.options import Error as OptionsError
                    
52    """
                    
53    Initialize options for use with Tornado.
                    
54    """
                    
84    """
                    
85    Set up the session for SQLAlchemy.
                    
86    """
                    
                
index.py https://gitlab.com/sphaso/weiqi.gs | Python | 79 lines
                    
16
                    
17from tornado.web import HTTPError
                    
18from sqlalchemy.orm import undefer
                    
                
README.rst https://gitlab.com/carmes/aiomysql | ReStructuredText | 146 lines
                    
20to async, basically ``yield from`` and ``asyncio.coroutine`` added in
                    
21proper places)). `sqlalchemy` support ported from aiopg_.
                    
22
                    
96
                    
97Example of SQLAlchemy optional integration
                    
98------------------------------------------
                    
98------------------------------------------
                    
99Sqlalchemy support has been ported from aiopg_ so api should be very familiar
                    
100for aiopg_ user.:
                    
105   from aiomysql.sa import create_engine
                    
106   import sqlalchemy as sa
                    
107
                    
145.. _PyMySQL: https://github.com/PyMySQL/PyMySQL
                    
146.. _Tornado-MySQL: https://github.com/PyMySQL/Tornado-MySQL
                    
147
                    
                
index.py https://gitlab.com/Xylol/weiqi.gs | Python | 84 lines
                    
16
                    
17from sqlalchemy.orm import undefer
                    
18from tornado.web import HTTPError
                    
                
Activation.py https://gitlab.com/fdemian/Shelob | Python | 118 lines
                    
2from api.model.models import User, UserActivation
                    
3from tornado.web import RequestHandler
                    
4from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
                    
4from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
                    
5from tornado.gen import coroutine
                    
6
                    
                
README.rst https://github.com/fhats/partify.git | ReStructuredText | 21 lines
                    
13* Flask-WTF, a Flask extension for WTForms supporpt
                    
14* Flask-SQLAlchemy, a Flask extension for SQLAlchemy support
                    
15* SQLAlchemy, a SQL abstraction framework
                    
17* CoffeeScript (optional), required to build the javascript assets
                    
18* Tornado (recommended), a fast Python web server
                    
19* Testify (optional), to run the unit tests
                    
                
role.py https://bitbucket.org/paasmaker/paasmaker.git | Python | 549 lines
                    
18
                    
19import tornado
                    
20import tornado.testing
                    
20import tornado.testing
                    
21import sqlalchemy
                    
22
                    
150				self.session.refresh(role)
                    
151			except sqlalchemy.exc.IntegrityError, ex:
                    
152				self.session.rollback()
                    
264		if not allocation:
                    
265			raise tornado.HTTPError(404, "No such allocation.")
                    
266
                    
290		routes.extend(RoleAllocationUnAssignController.get_routes({'configuration': self.configuration}))
                    
291		application = tornado.web.Application(routes, **self.configuration.get_tornado_configuration())
                    
292		return application
                    
                
configuration.py https://bitbucket.org/paasmaker/paasmaker.git | Python | 1404 lines
                    
33from pubsub import pub
                    
34from sqlalchemy import create_engine
                    
35from sqlalchemy.orm import sessionmaker
                    
35from sqlalchemy.orm import sessionmaker
                    
36from sqlalchemy import func
                    
37import sqlalchemy
                    
39from paasmaker.thirdparty.pika import TornadoConnection
                    
40from paasmaker.thirdparty.tornadoredis import Client as TornadoRedisClient
                    
41import pika
                    
44# For parsing command line options.
                    
45from tornado.options import define, options
                    
46import tornado.testing
                    
52# Set up command line options.
                    
53define("debug", type=int, default=0, help="Enable Tornado debug mode. Also prevents Paasmaker from forking into the background.")
                    
54define("configfile", type=str, default="", help="Override configuration file.")
                    
                
OAuthService.py https://gitlab.com/fdemian/Shelob | Python | 91 lines
                    
1from tornado import gen
                    
2from .FacebookService import FacebookAuthService
                    
4from api.authentication.AuthExceptions import OAuthFailedException, NoSuchServiceException
                    
5from sqlalchemy.orm.exc import MultipleResultsFound
                    
6from api.model.sessionHelper import get_session
                    
                
TwitterService.py https://gitlab.com/fdemian/Shelob | Python | 53 lines
                    
1import tornado
                    
2import tornado.web
                    
2import tornado.web
                    
3import tornado.auth
                    
4from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound
                    
8
                    
9class TwitterService(tornado.web.RequestHandler, tornado.auth.TwitterMixin):
                    
10
                    
10
                    
11    @tornado.gen.coroutine
                    
12    def get(self, auth_code, redirect_url):
                    
                
Stories.py https://gitlab.com/fdemian/Shelob | Python | 359 lines
                    
2from api.model.models import Story, User, Category
                    
3from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
                    
4from api.authentication.AuthenticatedHandler import AuthenticatedHandler
                    
4from api.authentication.AuthenticatedHandler import AuthenticatedHandler
                    
5from tornado.web import RequestHandler
                    
6from tornado.gen import coroutine
                    
                
FacebookService.py https://gitlab.com/fdemian/Shelob | Python | 103 lines
                    
1from tornado.auth import FacebookGraphMixin
                    
2from tornado.gen import coroutine
                    
2from tornado.gen import coroutine
                    
3from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound
                    
4from api.model.sessionHelper import get_session
                    
                
Dockerfile https://gitlab.com/rbax81/VisTrails | Dockerfile | 54 lines
                    
13    python-mako python-matplotlib python-mysqldb python-numpy python-paramiko \
                    
14    python-pip python-scipy python-setuptools python-sphinx python-sqlalchemy \
                    
15    python-suds python-tz python-unittest2 python-virtualenv \
                    
19    imagemagick xvfb
                    
20# Install IPython deps. python-tornado is too old, so we'll get it from pip
                    
21RUN \
                    
38  pip install -r requirements.txt && \
                    
39  pip install 'tornado>=4.0' jsonschema
                    
40
                    
                
setup.py https://gitlab.com/czm1129/pyspider | Python | 124 lines
                    
28    'requests>=2.2',
                    
29    'tornado>=3.2',
                    
30    'Flask-Login>=0.2.11',
                    
43    'pymongo>=2.7.2',
                    
44    'SQLAlchemy>=0.9.7',
                    
45    'redis',
                    
                
setup.py https://gitlab.com/e0/luigi | Python | 90 lines
                    
39install_requires = [
                    
40    'tornado>=4.0,<5',
                    
41    'python-daemon<3.0',
                    
45    # So that we can build documentation for luigi.db_task_history and luigi.contrib.sqla
                    
46    install_requires.append('sqlalchemy')
                    
47    # readthedocs don't like python-daemon, see #1342
                    
                
GoogleService.py https://gitlab.com/fdemian/Shelob | Python | 80 lines
                    
1import tornado
                    
2import tornado.web
                    
2import tornado.web
                    
3from tornado.auth import GoogleOAuth2Mixin
                    
4from tornado.web import RequestHandler
                    
4from tornado.web import RequestHandler
                    
5from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound
                    
6from api.model.sessionHelper import get_session
                    
                
app_frontend.pp https://gitlab.com/EnLab/zulip | Puppet | 143 lines
                    
17                    "python-mock",
                    
18                    # Tornado dependencies
                    
19                    "python-tornado",
                    
19                    "python-tornado",
                    
20                    "python-sockjs-tornado",
                    
21                    # Needed for our fastcgi setup
                    
31                    # Needed for building complex DB queries
                    
32                    "python-sqlalchemy",
                    
33                    # Needed for integrations
                    
119  }
                    
120  file { "/home/zulip/tornado":
                    
121    ensure => directory,
                    
                
getting.started.rst https://github.com/gabrielhurley/nova.git | ReStructuredText | 168 lines
                    
51  means to install ldap.
                    
52* **MySQL**: Either MySQL or another database supported by sqlalchemy needs to
                    
53  be avilable.  Currently, only sqlite3 an mysql have been tested.
                    
88* euca2ools: python implementation of aws ec2-tools and ami tools
                    
89* build tornado to use C module for evented section
                    
90
                    
                
introduction.md https://github.com/limodou/uliweb-doc.git | Markdown | 130 lines
                    
23    URL Mapping,Debug,Request, Response 等。
                    
24* [SqlAlchemy](http://www.sqlalchemy.org) 基于它封装了Uliorm,可以使用ORM对
                    
25    数据库进行处理。
                    
28
                    
29* template 是从 [tornado](http://mdp.cti.depaul.edu/) 改造来的(从0.4开始,在此之前是基于 [web2py](http://mdp.cti.depaul.edu/) )
                    
30* 部分处理代码从 [Django](http://www.djangoproject.com/) 中借鉴
                    
36* Cache 和 Session 模块
                    
37* Uliorm,是在SqlAlchemy基础之上进行的封装,同时参考了GAE中的datastore的代码
                    
38* 框架的处理代码,这块不可能不自已造了
                    
                
packagegroup-meta-python.bb https://gitlab.com/oryx/meta-openembedded | Bitbake | 150 lines
                    
31    python-setuptools-scm python-evdev python-pyjks python-jsonpointer python-cheetah python-gevent \
                    
32    python-smbus python-sqlalchemy python-scrypt python-werkzeug python-anyjson python-pexpect \
                    
33    python-robotframework-seriallibrary python-pyalsaaudio python-pytest-helpers-namespace \
                    
37    python-lazy-object-proxy python-cryptography-vectors python-crcmod python-pyusb python-vobject \
                    
38    python-webcolors python-pyparsing python-beautifulsoup4 python-cffi python-tornado-redis \
                    
39    python-itsdangerous python-pyasn1-modules python-netaddr python-vcversioner \
                    
51    python-enum34 python-pyperclip python-flask-uploads python-pbr python-parse python-pyflakes \
                    
52    python-pyhamcrest python-mako python-incremental python-tornado python-xstatic-font-awesome \
                    
53    python-cmd2 python-strict-rfc3339 python-pycodestyle python-xstatic python-snakefood \
                    
54    python-pybluez python-flask-navigation python-pyfirmata python-pymongo python-pysqlite \
                    
55    python-progress python-flask-sqlalchemy python-pymisp python-pip python-ujson python-ply \
                    
56    python-pep8 python-dateutil python-pycparser python-daemonize python-astroid python-pyrex \
                    
80    python3-pytest-runner python3-pyiface python3-flask-login python3-markupsafe python3-setuptools-scm \
                    
81    python3-semver python3-sdnotify python3-flask-user python3-tornado python3-jsonpatch python3-pexpect \
                    
82    python3-progress python3-jsonschema python3-xstatic python3-pyroute2 python3-idna python3-sqlalchemy \
                    
                
openphoto.py https://github.com/RyanBalfanz/OpenPhoto.git | Python | 172 lines
                    
4A simple web server that can handle photo uploads from the OpenPhoto iOS application.
                    
5Uses the Tornado web server:  http://www.tornadoweb.org
                    
6
                    
35
                    
36import tornado.web
                    
37import tornado.auth
                    
37import tornado.auth
                    
38import tornado.escape
                    
39import tornado.httpserver
                    
39import tornado.httpserver
                    
40import tornado.ioloop
                    
41import tornado.options
                    
41import tornado.options
                    
42from tornado.options import define, options
                    
43
                    
                
base.py https://gitlab.com/forevercat/Project | Python | 75 lines
                    
5
                    
6import tornado.web
                    
7from tornado import httputil
                    
8
                    
9import sqlalchemy
                    
10from sqlalchemy import create_engine
                    
10from sqlalchemy import create_engine
                    
11from sqlalchemy.orm import sessionmaker
                    
12from sqlalchemy import func
                    
21
                    
22class BaseHandler(tornado.web.RequestHandler):
                    
23    __model__ = '__base__'
                    
                
Drafts.py https://gitlab.com/fdemian/Shelob | Python | 281 lines
                    
2from api.model.models import Story, User, Category
                    
3from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
                    
4from api.authentication.AuthenticatedHandler import AuthenticatedHandler
                    
4from api.authentication.AuthenticatedHandler import AuthenticatedHandler
                    
5from tornado.gen import coroutine
                    
6from api.Utils import authenticated
                    
                
__init__.py https://github.com/stan1y/MrHide.git | Python | 50 lines
                    
9
                    
10import tornado.web
                    
11
                    
15
                    
16import sqlalchemy.orm.exc
                    
17
                    
21
                    
22class BaseRequestHandler(tornado.web.RequestHandler):
                    
23
                    
                
talk.rst https://bitbucket.org/pypy/extradoc/ | ReStructuredText | 202 lines
                    
115* RPython ``psycopg2`` compatible lib, requires compiling your own PyPy
                    
116* ``pg8000`` and tons of other random libraries, Django doesn't work with them, but if they're pure Python they'll work with other stuff (e.g. SQLAlchemy)
                    
117
                    
165
                    
166Tornado web app
                    
167---------------
                    
                
__init__.py https://github.com/araddon/demisauce.git | Python | 23 lines
                    
1#!/usr/bin/env python
                    
2import tornado.options
                    
3from tornado.options import define, options
                    
21
                    
22define("sqlalchemy_default_url", default=("mysql://root:demisauce@192.168.1.7/demisauce"))
                    
23define("sqlalchemy_default_echo", default=True, type=bool,help="run in echo mode")
                    
                
__init__.py https://gitlab.com/Xylol/weiqi.gs | Python | 42 lines
                    
18
                    
19from sqlalchemy.orm import scoped_session
                    
20from weiqi import settings
                    
34# in factory boy.
                    
35# This is mainly used to test tornado request handlers.
                    
36from contextlib import contextmanager
                    
                
README.rst https://github.com/araddon/demisauce.git | ReStructuredText | 67 lines
                    
9
                    
10Powered By `Tornado <http://www.tornadoweb.org>`_, MySql, `Gearman <http://www.gearman.org>`_, `Redis <http://www.tornadoweb.org>`_
                    
11
                    
28======================
                    
29After making changes to the model, if you are using SQLAlchemy to 
                    
30create db, you can write changes to db using:  (runs websetup.py setup_config())::
                    
                
__init__.py https://github.com/araddon/demisauce.git | Python | 334 lines
                    
1import logging, re, time, json, datetime
                    
2from tornado import escape
                    
3from sqlalchemy import create_engine
                    
3from sqlalchemy import create_engine
                    
4from sqlalchemy import Column, MetaData, Table, types
                    
5from sqlalchemy import engine, orm
                    
5from sqlalchemy import engine, orm
                    
6from sqlalchemy.orm import mapper, relation
                    
7from sqlalchemy.orm import scoped_session, sessionmaker
                    
8from demisauce.model import meta
                    
9from tornado.options import define, options
                    
10from demisaucepy.serializer import SerializationMixin
                    
34
                    
35class sqlalchemydb(object):
                    
36    def __init__(self,engine=None,session=None,metadata=None,
                    
                
setup.py https://bitbucket.org/marcelm/exomate.git | Python | 69 lines
                    
37		rsync -p \\
                    
38		        ./run_tornado.py {prefix}/
                    
39		echo "git_revision='$(date +"%Y-%m-%d") $(git rev-parse --short HEAD)'" >> {prefix}/exomate/__init__.py
                    
55	install_requires = [
                    
56		"SQLalchemy >= 0.8.0b2",
                    
57		"Flask-SQLAlchemy"
                    
                
app.js https://bitbucket.org/benluo/shlug_slides_201205 | JavaScript | 311 lines
                    
59}, {
                    
60content: "Enyo + Zerkzeug + SQLAlchemy \u6846\u67b6"
                    
61}, {
                    
137}, {
                    
138content: "Tornado \u4ecb\u7ecd\u4e2d\u592a\u5f3a\u608d\uff0c\u800c\u4e14\u7528\u4e86 eventloop, \u6709\u70b9\u62c5\u5fc3"
                    
139}, {
                    
146}, {
                    
147content: "\u548c SQLAlchemy \u914d\u5408"
                    
148}, {
                    
181}, {
                    
182tag: "a href='http://http://www.tornadoweb.org/'",
                    
183content: "Tornado \uff0d\uff0d \u4ece FaceBook \u6765\u7684 Python Web \u6846\u67b6"
                    
191}, {
                    
192tag: "a href='http://http://www.sqlalchemy.org/'",
                    
193content: "SQLAlchemy\u3000\uff0d\uff0d\u3000Python \u4e2d\u6700\u6d41\u884c\u7684 ORM \u5e93"
                    
                
index.html https://bitbucket.org/frank418/tblog.git | HTML | 123 lines
                    
70        </ul>
                    
71        <h3 class="muted">Tornado Blog by Frank</h3>
                    
72    </div>
                    
76    <div class="jumbotron">
                    
77        <h1>开始用Tornado重写博客系统!</h1>
                    
78        <a class="btn btn-large btn-success" href="http://git.0418.me/tblog">查看源码</a>
                    
84        <div class="span6">
                    
85            <h4>Tornado</h4>
                    
86
                    
95        <div class="span6">
                    
96            <h4>SQLAlchemy</h4>
                    
97
                    
                
create_database.py https://gitlab.com/fdemian/Shelob | Python | 38 lines
                    
1from sqlalchemy import create_engine
                    
2from tornado.options import define, options, parse_config_file
                    
                
sessionHelper.py https://gitlab.com/fdemian/Shelob | Python | 35 lines
                    
1from sqlalchemy import create_engine
                    
2from sqlalchemy.orm import sessionmaker
                    
2from sqlalchemy.orm import sessionmaker
                    
3from tornado.options import options, parse_config_file
                    
4from os import path
                    
                
web_server.py https://github.com/kramer314/sagecell.git | Python | 64 lines
                    
10from trusted_kernel_manager import TrustedMultiKernelManager as TMKM
                    
11from db_sqlalchemy import DB
                    
12
                    
12
                    
13# Tornado / zmq imports
                    
14import zmq
                    
15from zmq.eventloop import ioloop
                    
16import tornado.web
                    
17
                    
23
                    
24# Tornado Web Server
                    
25import handlers
                    
26
                    
27class SageCellServer(tornado.web.Application):
                    
28    def __init__(self):
                    
                
index.rst https://gitlab.com/carmes/aiomysql | ReStructuredText | 141 lines
                    
11.. _aiopg: https://github.com/aio-libs/aiopg
                    
12.. _Tornado-MySQL: https://github.com/PyMySQL/Tornado-MySQL
                    
13.. _aio-libs: https://github.com/aio-libs
                    
22to async, basically ``yield from`` and ``asyncio.coroutine`` added in
                    
23proper places. :term:`sqlalchemy` support ported from aiopg_.
                    
24
                    
31  :ref:`aiomysql-cursors` and :ref:`aiomysql-pool` objects.
                    
32* Implements *optional* support for charming :term:`sqlalchemy`
                    
33  functional sql layer.
                    
82
                    
83.. _aiomysql-install-sqlalchemy:
                    
84
                    
85:mod:`aiomysql.sa` module is **optional** and requires
                    
86:term:`sqlalchemy`. You can install *sqlalchemy* by running::
                    
87
                    
                
python-libs.yaml https://github.com/pjotrp/cloudbiolinux.git | YAML | 83 lines
                    
70  - scipy
                    
71  - SQLAlchemy
                    
72  - statsmodels
                    
72  - statsmodels
                    
73  - tornado
                    
74  
                    
                
setup.py https://github.com/fhats/partify.git | Python | 34 lines
                    
29        "Flask-WTF == 0.8",
                    
30        "Flask-SQLAlchemy == 0.16",
                    
31        "tornado == 2.4"
                    
                
GithubService.py https://gitlab.com/fdemian/Shelob | Python | 112 lines
                    
1import tornado
                    
2import tornado.web
                    
3from .GithubMixin import GithubOAuth2Mixin
                    
4from tornado.web import RequestHandler
                    
5from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound
                    
7from api.model.models import User
                    
8from tornado.httpclient import AsyncHTTPClient
                    
9from urllib.parse import urlencode
                    
16
                    
17    @tornado.gen.coroutine
                    
18    def get(self, auth_code, redirect_url):
                    
69    def get_auth_http_client(self):
                    
70        http_headers = tornado.httputil.HTTPHeaders({"Accept": "application/json"})
                    
71        AsyncHTTPClient.configure(None, defaults=dict(headers=http_headers))
                    
73
                    
74    @tornado.gen.coroutine
                    
75    def handle_token_response(response):
                    
                
main.py https://gitlab.com/forevercat/Project | Python | 60 lines
                    
4import types
                    
5import tornado.ioloop
                    
6import tornado.web
                    
6import tornado.web
                    
7import sqlalchemy
                    
8from sqlalchemy import create_engine
                    
8from sqlalchemy import create_engine
                    
9from sqlalchemy.orm import sessionmaker
                    
10from sqlalchemy import func
                    
15
                    
16class ESApplication(tornado.web.Application):
                    
17    def __init__(self, api_entry, **settings):
                    
56    application.listen(port)
                    
57    tornado.ioloop.IOLoop.instance().start()
                    
58
                    
                
TwitterRedirect.py https://gitlab.com/fdemian/Shelob | Python | 63 lines
                    
1from tornado import gen
                    
2from tornado.web import RequestHandler
                    
2from tornado.web import RequestHandler
                    
3from tornado.auth import TwitterMixin, AuthError
                    
4from tornado.escape import json_encode
                    
6from api.model.models import User
                    
7from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound
                    
8
                    
                
Categories.py https://gitlab.com/fdemian/Shelob | Python | 201 lines
                    
3from api.authentication.AuthenticatedHandler import AuthenticatedHandler
                    
4from tornado.web import RequestHandler
                    
5from tornado.gen import coroutine
                    
5from tornado.gen import coroutine
                    
6from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
                    
7from api.Utils import authenticated
                    
                
appbase.py https://github.com/peter-the-tea-drinker/tornado-base.git | Python | 57 lines
                    
1import config
                    
2import sqlalchemy
                    
3import sqlalchemy.orm
                    
3import sqlalchemy.orm
                    
4from sqlalchemy.ext.declarative import declarative_base
                    
5
                    
18        self.engine = None
                    
19        self.Session = sqlalchemy.orm.sessionmaker()
                    
20        self.Base = declarative_base()
                    
26orm = ORM()
                    
27orm.initialize(sqlalchemy.create_engine(config.DB))#, encoding='utf-8'))
                    
28
                    
28
                    
29sql = sqlalchemy
                    
30
                    
                
README.md https://gitlab.com/lcp0578/FrameworkBenchmarks.git | Markdown | 126 lines
                    
70
                    
71### Gunicorn + Tornado
                    
72
                    
74Meinheld doesn't so fast with PyPy because it uses Python/C API heavily.
                    
75So we use Tornado as HTTP/WSGI server.
                    
76
                    
93
                    
94If your framework uses SQLAlchemy, Flask may be enough to know performance of SQLAlchemy.
                    
95
                    
                
HOWTO.md https://bitbucket.org/mixedpower/tordos.git | Markdown | 51 lines
                    
18      |-tordos                      -- web项目python模块的顶层包
                    
19        |-core                      -- 放了一些收集到tornado做web项目需要用到的外部支持模块
                    
20          |-http
                    
25          |-orm
                    
26            |-sqlalchemy.py            -- 集成SQLAlchemy orm框架(配置参数:ORM_TYPE)
                    
27            |-peewee.py                -- 集成peeweee orm框架
                    
42            |-model.py                 -- 该模块用到的自定义数据类
                    
43            |-uimodules.py             -- 若使用了tornado模板,可以定义该文件
                    
44            |-static
                    
                
sdk_updates.py https://github.com/pombredanne/django-sentry.git | Python | 451 lines
                    
231        "sdk_version_added": "0.6.3",
                    
232        "module_name": "tornado",
                    
233        "module_version_min": "5.0.0",
                    
234        "suggestion": EnableIntegrationSuggestion(
                    
235            "tornado", "https://docs.sentry.io/platforms/python/tornado/"
                    
236        ),
                    
249        "sdk_version_added": "0.11.0",
                    
250        "module_name": "sqlalchemy",
                    
251        "module_version_min": "1.2.0",
                    
252        "suggestion": EnableIntegrationSuggestion(
                    
253            "sqlalchemy", "https://docs.sentry.io/platforms/python/sqlalchemy/"
                    
254        ),
                    
                
README.rst https://github.com/thecowboy/apollo.git | ReStructuredText | 47 lines
                    
10
                    
11 * Tornado
                    
12   http://www.tornadoweb.org
                    
13
                    
14 * SQLAlchemy
                    
15   http://www.sqlalchemy.org
                    
25
                    
26And any form of RDBMS SQLAlchemy supports (PostgreSQL, MySQL, etc.).
                    
27
                    
                
config.py https://github.com/araddon/demisauce.git | Python | 120 lines
                    
1import logging, json
                    
2from sqlalchemy import Column, MetaData, ForeignKey, Table, \
                    
3    func, UniqueConstraint
                    
3    func, UniqueConstraint
                    
4from sqlalchemy import Integer, String as DBString, DateTime, Boolean, \
                    
5    Text as DBText
                    
5    Text as DBText
                    
6from sqlalchemy import engine, orm
                    
7from sqlalchemy.orm import mapper, relation, class_mapper, synonym, dynamic_loader
                    
7from sqlalchemy.orm import mapper, relation, class_mapper, synonym, dynamic_loader
                    
8from sqlalchemy.sql import and_, text
                    
9from datetime import datetime
                    
15from wtforms.validators import ValidationError
                    
16from tornado import escape
                    
17from tornado.options import options
                    
                
Makefile https://github.com/freebsd/freebsd-ports.git | Makefile | 25 lines
                    
14RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}psycopg2>0:databases/py-psycopg2@${PY_FLAVOR} \
                    
15		${PYTHON_PKGNAMEPREFIX}sqlalchemy10>=1.0:databases/py-sqlalchemy10@${PY_FLAVOR} \
                    
16		${PYTHON_PKGNAMEPREFIX}tornado>=2.0:www/py-tornado@${PY_FLAVOR}
                    
                
run_server.py https://gitlab.com/lotaku/tornado_jinja.git | Python | 69 lines
                    
7import motor
                    
8import tornado
                    
9from tornado.options import options
                    
30#todo ?
                    
31reset_option('sqlalchemy_kwargs', {}, type=dict)
                    
32
                    
65    parse_config_file(os.path.join(PROJDIR, 'etc/server.conf'))
                    
66    tornado.options.parse_command_line()
                    
67    application = create_application()
                    
                
tools.rst git://github.com/mongodb/mongo-python-driver.git | ReStructuredText | 169 lines
                    
69  `MotorEngine <https://motorengine.readthedocs.io/>`_ is a port of
                    
70  MongoEngine to Motor, for asynchronous access with Tornado.
                    
71  It implements the same modeling APIs to be data-portable, meaning that a
                    
92  `MongoAlchemy <http://mongoalchemy.org>`_ is another ORM-like layer on top of
                    
93  PyMongo. Its API is inspired by `SQLAlchemy <http://sqlalchemy.org>`_. The
                    
94  code is available `on GitHub <http://github.com/jeffjenkins/MongoAlchemy>`_;
                    
163* `Motor <https://github.com/mongodb/motor>`_ is a full-featured, non-blocking
                    
164  MongoDB driver for Python Tornado applications.
                    
165* `TxMongo <https://github.com/twisted/txmongo>`_ is an asynchronous Twisted
                    
                
Slides.js https://bitbucket.org/benluo/shlug_slides_201205 | JavaScript | 113 lines
                    
18            {content:"Python Web 框架选型"},
                    
19            {content:"Enyo + Zerkzeug + SQLAlchemy 框架"},
                    
20            {content:"问答"}
                    
68            {content: 'Pyride 有 template, 有zope 血统'},
                    
69            {content: 'Tornado 介绍中太强悍,而且用了 eventloop, 有点担心'},
                    
70            {tag:'h2', content: '最终选择 Zerkzurg -- Flask 底层的库'},
                    
72            {content: '够轻量'},
                    
73            {content: '和 SQLAlchemy 配合'},
                    
74            {content: 'URL 分发经过封装可以比较好看'}
                    
89            {tag: 'br'},
                    
90            {tag: "a href='http://http://www.tornadoweb.org/'", content:"Tornado -- 从 FaceBook 来的 Python Web 框架"},
                    
91            {tag: 'br'},
                    
93            {tag: 'br'},
                    
94            {tag: "a href='http://http://www.sqlalchemy.org/'", content:"SQLAlchemy -- Python 中最流行的 ORM 库"}
                    
95        ]
                    
                
app.py https://bitbucket.org/angryshortone/grump-o-nado.git | Python | 196 lines
                    
12
                    
13from tornado.ioloop import IOLoop
                    
14from tornado.web import Application
                    
15from tornado.web import StaticFileHandler
                    
16from tornado_sqlalchemy import make_session_factory
                    
17
                    
                
b_bantang.py https://gitlab.com/liningpifu/wishing | Python | 183 lines
                    
2
                    
3import tornado
                    
4from tornado import template, httpclient
                    
5import hashlib, urllib
                    
6import sqlalchemy, models
                    
7from sqlalchemy.sql import and_, or_, not_
                    
41def fetch_url(url, callback, method = 'GET', data = {}, headers = {}, follow_redirects = True, use_proxy=False):
                    
42        httpclient.AsyncHTTPClient.configure("tornado.curl_httpclient.CurlAsyncHTTPClient")
                    
43        http_client = httpclient.AsyncHTTPClient()
                    
177                crawl_list(target_url)
                    
178        tornado.ioloop.IOLoop.instance().add_timeout(timedelta(seconds = delta), main)
                    
179
                    
181        main()
                    
182        tornado.ioloop.IOLoop.instance().start()
                    
183
                    
                
INSTALL.sh https://github.com/hisaki/nova-scripts.git | Shell | 141 lines
                    
45echo 'tornado-1.1'
                    
46wget http://github.com/downloads/facebook/tornado/tornado-1.1.tar.gz
                    
47echo 'gflags'
                    
53echo 'python-sqlalchemy'
                    
54wget http://downloads.sourceforge.net/project/sqlalchemy/sqlalchemy/0.6.5/SQLAlchemy-0.6.5.tar.gz
                    
55popd
                    
56
                    
57#echo "- Manual Install for python-redis, tornado, gflags and python-gflags" >> $TODO_FILE
                    
58echo "- Manual Install for tornado, gflags, python-gflags,
                    
58echo "- Manual Install for tornado, gflags, python-gflags,
                    
59python-eventlet and python-sqlalchemy from $TEMP_DIR
                    
60If you use Ubuntu 10.10, you can install with apt-get" >> $TODO_FILE
                    
                
overview.rst https://github.com/ceari/edacc_web.git | ReStructuredText | 171 lines
                    
26WSGI-compatible, which means it can be deployed on any web server supporting Python and WSGI.
                    
27(e.g. Apache (using mod_wsgi), lighttpd, nginx, Tornado, just to name a few)
                    
28
                    
32- Python 2.6.5 or 2.7.1 http://www.python.org
                    
33- SQLAlchemy 0.6.5 (SQL Toolkit and Object Relational Mapper)
                    
34- mysql-python 1.2.3c1 (Python MySQL adapter)
                    
149    > pip install flask flask-wtf flask-actions
                    
150    > pip install sqlalchemy pylzma
                    
151
                    
                
basehandler.py https://bitbucket.org/angryshortone/grump-o-nado.git | Python | 219 lines
                    
15from jwt import InvalidTokenError, ExpiredSignatureError
                    
16from tornado.escape import json_decode
                    
17import tornado.web
                    
18from tornado.gen import coroutine
                    
19from tornado_sqlalchemy import SessionMixin, as_future
                    
20
                    
25
                    
26class Basehandler(tornado.web.RequestHandler, SessionMixin):
                    
27    """Basehandler"""
                    
                
software.rst https://github.com/victorpantoja/mobile-social-share-server.git | ReStructuredText | 88 lines
                    
31
                    
32Outro componente importante é o Tornado, um framework bem enxuto com um poderoso web server non-blocking e muito simples de ser implementado. Suas principais características são:
                    
33
                    
33
                    
34* Tornado
                    
35	* Simples
                    
41	
                    
42O gráfico abaixo apresenta um benchmark entre a utlização do nginx + tornado e as implementações mais comuns para aplicações web Python:
                    
43
                    
43
                    
44.. image :: ../img/tornado_benchmark.png
                    
45
                    
46Outros componentes:
                    
47	* SQLAlchemy: camada de acesso ao banco de dados (ORM)
                    
48	* Mako: gerenciador de templates
                    
                
StudentModel.py https://gitlab.com/CloudPrintTech/CloudPrintBackend | Python | 205 lines
                    
3
                    
4from sqlalchemy.sql.expression import and_, or_
                    
5from Model.BaseModel import BaseModel
                    
5from Model.BaseModel import BaseModel
                    
6from sqlalchemy import and_
                    
7from Model.ORM import *
                    
7from Model.ORM import *
                    
8import tornado.web
                    
9import hashlib
                    
138        except KeyError:
                    
139            raise tornado.web.HTTPError(400)
                    
140        except Exception as emsg:
                    
151        except KeyError:
                    
152            raise tornado.web.HTTPError(400)
                    
153        except Exception as emsg:
                    
                
DESCRIPTION.rst https://bitbucket.org/lina_wang_veeva/vone.git | ReStructuredText | 75 lines
                    
28* Memory
                    
29* `SQLAlchemy <http://www.sqlalchemy.org/>`_ (any RDBMS supported by SQLAlchemy works)
                    
30* `MongoDB <http://www.mongodb.org/>`_
                    
38* `gevent <http://www.gevent.org/>`_
                    
39* `Tornado <http://www.tornadoweb.org/>`_
                    
40* `Twisted <http://twistedmatrix.com/>`_
                    
                
app.py https://github.com/araddon/demisauce.git | Python | 111 lines
                    
2#!/usr/bin/env python
                    
3import tornado.auth
                    
4import tornado.httpserver
                    
5import tornado.ioloop
                    
6import tornado.options
                    
7import tornado.web
                    
7import tornado.web
                    
8import tornado.escape
                    
9from tornado.options import define, options
                    
14import demisauce
                    
15tornado.options.parse_command_line() # must force load of options for metaclass
                    
16from demisaucepy import cache_setup
                    
72            "facebook_secret":options.facebook_secret,
                    
73            "sqlalchemy_default_url":options.sqlalchemy_default_url,
                    
74            "sqlalchemy_default_echo":options.sqlalchemy_default_echo,
                    
                
root.py https://github.com/LamCiuLoeng/BookStore.git | Python | 132 lines
                    
12import traceback
                    
13import tornado
                    
14
                    
15
                    
16from sqlalchemy.sql import and_
                    
17from sqlalchemy.orm.exc import  NoResultFound
                    
                
test_handlers.py https://bitbucket.org/angryshortone/grump-o-nado.git | Python | 418 lines
                    
9import jwt
                    
10from sqlalchemy import create_engine
                    
11from sqlalchemy.orm import sessionmaker
                    
11from sqlalchemy.orm import sessionmaker
                    
12from tornado import testing, escape
                    
13from tornado.web import Application
                    
13from tornado.web import Application
                    
14from tornado_sqlalchemy import make_session_factory
                    
15
                    
40    def get_app(self):
                    
41        """Get the tornado app to run the tests. This is a default
                    
42        configuration
                    
                
handlers.py https://bitbucket.org/angryshortone/grump-o-nado.git | Python | 348 lines
                    
11
                    
12from sqlalchemy.exc import IntegrityError
                    
13from tornado.escape import json_decode
                    
13from tornado.escape import json_decode
                    
14from tornado.gen import coroutine
                    
15from tornado.web import authenticated, MissingArgumentError
                    
15from tornado.web import authenticated, MissingArgumentError
                    
16from tornado_sqlalchemy import as_future
                    
17from wtforms.fields import StringField
                    
18from wtforms.validators import Email, DataRequired, Length
                    
19from wtforms_tornado import Form
                    
20
                    
39    Args:
                    
40        wtformms_tornado.Form (the formdata to validate against the before mentioned criteria):
                    
41    """
                    
                
versionhistory.rst https://bitbucket.org/jparma/apscheduler.git | ReStructuredText | 206 lines
                    
21
                    
22* Fixed table creation with SQLAlchemyJobStore on MySQL/InnoDB
                    
23
                    
34* Split the old Scheduler class into BlockingScheduler and BackgroundScheduler and added integration for
                    
35  asyncio (PEP 3156), Gevent, Tornado, Twisted and Qt event loops
                    
36
                    
70
                    
71* Fixed SQLAlchemy 0.8 compatibility in SQLAlchemyJobStore
                    
72
                    
98
                    
99* Removed the unique constraint from the "name" column in the SQLAlchemy
                    
100  job store
                    
115* Added configurable job stores with several persistent back-ends
                    
116  (shelve, SQLAlchemy and MongoDB)
                    
117
                    
                
README.rst https://github.com/marcelnicolay/torneira.git | ReStructuredText | 69 lines
                    
3
                    
4Torneira is a lightweight web framework build on top of Tornado_. It's name
                    
5came from the idea of getting rapid and fluid development ('torneira' is the
                    
54
                    
55 * Tornado_ (tested with 2.3 and 2.4)
                    
56
                    
58
                    
59 * Mako_ (if you want to use Mako templates instead of built-in tornado.template)
                    
60 * `SQL Alchemy`_ (only if using torneira.models)
                    
66.. _PyPI: http://pypi.python.org/package/torneira/
                    
67.. _SQL Alchemy: http://www.sqlalchemy.org/
                    
68.. _simplejson: http://code.google.com/p/simplejson/
                    
68.. _simplejson: http://code.google.com/p/simplejson/
                    
69.. _Tornado: http://www.tornadoweb.org/
                    
70
                    
                
ubuntu_first_install.sh https://bitbucket.org/daherssein/linuxtools | Shell | 71 lines
                    
39sudo pip install pyzmq
                    
40sudo pip install tornado
                    
41sudo pip install ipython
                    
57
                    
58sudo pip install sqlalchemy
                    
59sudo pip install flask
                    
                
start_app.py https://bitbucket.org/finalbattle/torweb | Python | 310 lines
                    
64
                    
65from sqlalchemy import Table
                    
66from sqlalchemy.orm import mapper
                    
66from sqlalchemy.orm import mapper
                    
67from sqlalchemy import select, and_, or_
                    
68from sqlalchemy.ext.declarative import declarative_base
                    
100    storm: store
                    
101    sqlalchemy: session
                    
102
                    
117
                    
118# sqlalchemy
                    
119test_model = Table('test_model', metadata, schema='%(app)s', autoload=True)
                    
148
                    
149from tornado.web import addslash
                    
150from torweb.urls import url
                    
                
ShopModel.py https://gitlab.com/CloudPrintTech/CloudPrintBackend | Python | 513 lines
                    
10from Model.ORM import *
                    
11from sqlalchemy.sql import exists
                    
12from sqlalchemy.sql import and_
                    
13import logging
                    
14import tornado.web
                    
15
                    
60        except KeyError :
                    
61            raise tornado.web.HTTPError(400)
                    
62        except Exception as emsg:
                    
98        except KeyError:
                    
99            raise tornado.web.HTTPError(400)
                    
100        except Exception as emsg:
                    
196        except KeyError:
                    
197            raise tornado.web.HTTPError(400)
                    
198        except Exception as emsg:
                    
                
OrderModel.py https://gitlab.com/CloudPrintTech/CloudPrintBackend | Python | 900 lines
                    
3
                    
4from sqlalchemy.sql.expression import and_, or_, desc
                    
5from sqlalchemy.sql.functions import max
                    
10import time
                    
11import tornado.web
                    
12import tornado.gen
                    
135        except KeyError:
                    
136            raise tornado.web.HTTPError(400)
                    
137        except Exception as emsg:
                    
179        except KeyError:
                    
180            raise tornado.web.HTTPError(400)
                    
181        except Exception as emsg:
                    
200        except KeyError:
                    
201            raise tornado.web.HTTPError(400)
                    
202        except Exception as emsg:
                    
                
SuperManagerModel.py https://gitlab.com/CloudPrintTech/CloudPrintBackend | Python | 195 lines
                    
4from Model.BaseModel import BaseModel
                    
5from sqlalchemy.sql.expression import and_
                    
6import hashlib
                    
8from Model.ORM import *
                    
9import tornado.web
                    
10
                    
27        except KeyError:
                    
28            raise tornado.web.HTTPError(400)
                    
29        except Exception as emsg:
                    
153        except KeyError:
                    
154            raise tornado.web.HTTPError(400)
                    
155        except Exception as emsg:
                    
172        except KeyError:
                    
173            raise tornado.web.HTTPError(400)
                    
174        except Exception as emsg:
                    
                
environment.yml https://github.com/DIRACGrid/DIRAC.git | YAML | 104 lines
                    
40  - six >=1.10
                    
41  - sqlalchemy
                    
42  - stomp.py =4.1.23
                    
88  - simplejson >=3.8.1
                    
89  #- tornado >=5.0.0,<6.0.0
                    
90  - typing >=3.6.6
                    
97    - pyjwt
                    
98    # This is a fork of tornado with a patch to allow for configurable iostream
                    
99    # It should eventually be part of DIRACGrid
                    
99    # It should eventually be part of DIRACGrid
                    
100    - git+https://github.com/DIRACGrid/tornado.git@iostreamConfigurable
                    
101    # This is an extension of Tornado to use M2Crypto
                    
102    # It should eventually be part of DIRACGrid
                    
103    - git+https://github.com/DIRACGrid/tornado_m2crypto
                    
104    - -e .
                    
                
login.py https://github.com/marcelnicolay/twitter-face-rank.git | Python | 60 lines
                    
6from torneira.core.meta import TorneiraSession
                    
7from sqlalchemy.orm.exc import NoResultFound
                    
8from tornado.web import HTTPError
                    
                
README.md https://gitlab.com/BeardyBear/tornado-generic-handlers.git | Markdown | 290 lines
                    
1<h1>tornado-generic-handlers</h1>
                    
2<p>This package contains Django's generic class based views adapted to be used with Tornado along with SQLAlchemy and WTForms. 
                    
3Note that implementation might differ a bit in some of the cases.<br/> The features included:
                    
13<h2>Configuration</h2>
                    
14<p>The only requirement is SQLAlchemy's session stored in application's db attribute.</p>
                    
15```python
                    
16#app.py
                    
17from sqlalchemy.orm import scoped_session, sessionmaker
                    
18
                    
18
                    
19class Application(tornado.web.Application):
                    
20    def __init__(self):
                    
131
                    
132class Application(tornado.web.Application):
                    
133    def __init__(self):
                    
                
models.py https://bitbucket.org/angryshortone/grump-o-nado.git | Python | 371 lines
                    
6
                    
7from sqlalchemy import Column, DateTime, Float, ForeignKey, String, LargeBinary, BigInteger
                    
8from sqlalchemy.ext.declarative import declared_attr
                    
9from sqlalchemy.orm import relationship
                    
10from tornado_sqlalchemy import declarative_base
                    
11
                    
                
README.md https://github.com/nuance/roaring-tofu.git | Markdown | 33 lines
                    
3
                    
4Source code for mhjones.org. It's a pretty simple blog + some social stuff. Written with tornado + sqlite (via sqlalchemy orm... not happy about that choice, but it's not worth replacing).
                    
5
                    
32
                    
33* ui module https handling for external assets. The tornado ui module code explicitly checks for http (and not https) when including 3rd party js. So using https google analytics doesn't work quite right. This would be really easy to fix, but I'm not actually serving https for anything, so this doesn't really matter.
                    
34
                    
                
README.rst https://github.com/marcelnicolay/nginx-monitor.git | ReStructuredText | 74 lines
                    
37
                    
38 * Tornado_ >= 0.2
                    
39 * Mako_ >= 0.3.2
                    
39 * Mako_ >= 0.3.2
                    
40 * SqlAlchemy_ >= 0.5.6
                    
41 * nose_ >= 0.11.0
                    
60
                    
61.. _Tornado: http://www.tornadoweb.org/
                    
62.. _Mako: http://www.makotemplates.org/
                    
62.. _Mako: http://www.makotemplates.org/
                    
63.. _SqlAlchemy: http://www.sqlalchemy.org/
                    
64.. _nose: http://code.google.com/p/python-nose/
                    
                
README.md git://github.com/limodou/uliweb.git | Markdown | 145 lines
                    
30    For example: URL Mapping, Debug, Request, Response, etc.
                    
31* [SqlAlchemy](http://www.sqlalchemy.org) The ORM based on it. Developers can access
                    
32    databases, or use the module separately.
                    
36
                    
37* The Templating system is modified from [tornado](http://www.tornadoweb.org/).
                    
38* Some code inspired from Django.
                    
45* Cache & Session modules.
                    
46* Uliorm, which is an ORM module, was built on top of SqlAlchemy. I also referenced from
                    
47    GAE datastore module.
                    
86
                    
87    * Uliorm is based on SQLAlchemy package, so you can use Model layer and SQL
                    
88        expression layer both.
                    
                
main.py https://github.com/cesarkawakami/competitionprintserver.git | Python | 311 lines
                    
5
                    
6from sqlalchemy import create_engine, desc
                    
7from sqlalchemy import Column, Integer, String, Enum, DateTime, ForeignKey
                    
7from sqlalchemy import Column, Integer, String, Enum, DateTime, ForeignKey
                    
8from sqlalchemy.ext.declarative import declarative_base
                    
9from sqlalchemy.orm import sessionmaker, relationship, backref
                    
9from sqlalchemy.orm import sessionmaker, relationship, backref
                    
10from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
                    
11from sqlalchemy.schema import UniqueConstraint
                    
12
                    
13import tornado.ioloop
                    
14import tornado.web
                    
68#
                    
69class BaseHandler(tornado.web.RequestHandler):
                    
70
                    
                
db.py https://gitlab.com/qb1t/mitro | Python | 49 lines
                    
1from tornado.options import define, options
                    
2
                    
2
                    
3from sqlalchemy import create_engine
                    
4from sqlalchemy.ext.declarative import declarative_base
                    
4from sqlalchemy.ext.declarative import declarative_base
                    
5from sqlalchemy.orm import sessionmaker
                    
6from sqlalchemy.pool import StaticPool
                    
6from sqlalchemy.pool import StaticPool
                    
7from sqlalchemy.pool import NullPool
                    
8
                    
32def connect_to_database():
                    
33    '''Connects SQLAlchemy to the database. Call this after command-line parsing.'''
                    
34
                    
40def connect_to_test_database():
                    
41    '''Connects SQLAlchemy to the test database. Call this after command-line
                    
42    parsing.'''
                    
                
models2.py https://gitlab.com/qb1t/mitro | Python | 48 lines
                    
9import sqlalchemy.ext.declarative
                    
10# import sqlalchemy.orm
                    
11# from sqlalchemy.pool import StaticPool
                    
13
                    
14# import tornado.options
                    
15
                    
25
                    
26    id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True, autoincrement=True, nullable=False)
                    
27    type_string = sqlalchemy.Column(sqlalchemy.Text, nullable=False)
                    
27    type_string = sqlalchemy.Column(sqlalchemy.Text, nullable=False)
                    
28    arg_string = sqlalchemy.Column(sqlalchemy.Text, nullable=False)
                    
29    attempted_time = sqlalchemy.Column(sqlalchemy.DateTime)
                    
29    attempted_time = sqlalchemy.Column(sqlalchemy.DateTime)
                    
30    template_name = sqlalchemy.Column('mandrill_template_name', sqlalchemy.Text, nullable=True)
                    
31    template_params_string = sqlalchemy.Column(
                    
                
project.py https://bitbucket.org/diverdano/mls.git | Python | 235 lines
                    
18# ## === 3rd party ===
                    
19from sqlalchemy import create_engine
                    
20from sqlalchemy.orm import sessionmaker
                    
23# import json
                    
24# from tornado.ioloop import IOLoop
                    
25# #from tornado.log import enable_pretty_logging
                    
25# #from tornado.log import enable_pretty_logging
                    
26# #import tornado.options
                    
27# from tornado.web import RequestHandler, Application, url, RedirectHandler, StaticFileHandler
                    
27# from tornado.web import RequestHandler, Application, url, RedirectHandler, StaticFileHandler
                    
28# from tornado.httpclient import AsyncHTTPClient
                    
29# from tornado.escape import json_decode
                    
29# from tornado.escape import json_decode
                    
30# from tornado import gen
                    
31# #import tornado.logging
                    
                
jupyterhub_config_0.8.py.j2 https://bitbucket.org/jstubbs/deployer_v2.git | Jinja | 784 lines
                    
71#
                    
72#  - is a tornado.gen.coroutine
                    
73#  - returns username on success, None on failure
                    
153## Include any kwargs to pass to the database connection. See
                    
154#  sqlalchemy.create_engine for details.
                    
155#c.JupyterHub.db_kwargs = {}
                    
338
                    
339## Extra settings overrides to pass to the tornado application.
                    
340#c.JupyterHub.tornado_settings = {}
                    
                
webserver.py https://bitbucket.org/diverdano/mls.git | Python | 619 lines
                    
17# ## === 3rd party ===
                    
18from sqlalchemy import create_engine
                    
19from sqlalchemy.orm import sessionmaker
                    
23# import json
                    
24# from tornado.ioloop import IOLoop
                    
25# #from tornado.log import enable_pretty_logging
                    
25# #from tornado.log import enable_pretty_logging
                    
26# #import tornado.options 
                    
27# from tornado.web import RequestHandler, Application, url, RedirectHandler, StaticFileHandler
                    
27# from tornado.web import RequestHandler, Application, url, RedirectHandler, StaticFileHandler
                    
28# from tornado.httpclient import AsyncHTTPClient
                    
29# from tornado.escape import json_decode
                    
29# from tornado.escape import json_decode
                    
30# from tornado import gen
                    
31# #import tornado.logging
                    
                
README.rst https://github.com/ceari/edacc_web.git | ReStructuredText | 177 lines
                    
26WSGI-compatible, which means it can be deployed on any web server supporting Python and WSGI.
                    
27(e.g. Apache (using mod_wsgi), lighttpd, nginx, Tornado, just to name a few)
                    
28
                    
32- Python 2.6.5 or 2.7.1 http://www.python.org
                    
33- SQLAlchemy 0.6.5 (SQL Toolkit and Object Relational Mapper)
                    
34- mysql-python 1.2.3c1 (Python MySQL adapter)
                    
96Summary:
                    
97pip install mysql-python pil pylzma numpy scipy flask flask-cache flask-wtf flask-actions flask-mail flask-kvsession rpy2 lxml scikits.learn sqlalchemy
                    
98   
                    
156    > pip install flask flask-wtf flask-actions flask-mail flask-cache flask-kvsession
                    
157    > pip install sqlalchemy pylzma pbkdf2
                    
158
                    
                
versionhistory.rst https://bitbucket.org/omus/apscheduler.git | ReStructuredText | 184 lines
                    
12* Split the old Scheduler class into BlockingScheduler and BackgroundScheduler and added integration for
                    
13  asyncio (PEP 3156), Gevent, Tornado, Twisted and Qt event loops
                    
14
                    
48
                    
49* Fixed SQLAlchemy 0.8 compatibility in SQLAlchemyJobStore
                    
50
                    
76
                    
77* Removed the unique constraint from the "name" column in the SQLAlchemy
                    
78  job store
                    
93* Added configurable job stores with several persistent back-ends
                    
94  (shelve, SQLAlchemy and MongoDB)
                    
95
                    
                
default.nix https://codeberg.org/matthiasbeyer/nixpkgs.git | Nix | 125 lines
                    
11, pamela
                    
12, sqlalchemy
                    
13, tornado
                    
110  propagatedBuildInputs = [
                    
111    alembic ipython jinja2 pamela python-oauth2 requests sqlalchemy tornado
                    
112    traitlets prometheus_client async_generator notebook certipy oauthlib
                    
                
default.nix https://codeberg.org/matthiasbeyer/nixpkgs.git | Nix | 52 lines
                    
15, sanic
                    
16, sqlalchemy
                    
17, stdenv
                    
17, stdenv
                    
18, tornado
                    
19, urllib3
                    
30
                    
31  checkInputs = [ django flask tornado bottle rq falcon sqlalchemy ]
                    
32  ++ stdenv.lib.optionals isPy3k [ celery pyramid sanic aiohttp ];
                    
                
test_resolver.py https://bitbucket.org/vionika/spin.android.git | Python | 144 lines
                    
18        # We should return a normal release version if prereleases is False
                    
19        (['SQLAlchemy'],
                    
20         ['sqlalchemy==0.9.9']),
                    
22        # We should return the prerelease version if prereleases is True
                    
23        (['SQLAlchemy'],
                    
24         ['sqlalchemy==1.0.0b5'],
                    
36             'jinja2==2.7.3',
                    
37             'tornado==3.2.2',
                    
38             'markupsafe==0.23',
                    
48             'jinja2==2.7.3',
                    
49             'tornado==3.2.2',
                    
50             'markupsafe==0.23',
                    
62             'jinja2==2.7.3',
                    
63             'tornado==3.2.2',
                    
64             'markupsafe==0.23',
                    
                
test_fake_index.py https://bitbucket.org/vionika/spin.android.git | Python | 63 lines
                    
20def test_find_best_match_incl_prereleases(from_line, repository):
                    
21    ireq = from_line('SQLAlchemy')
                    
22    assert str(repository.find_best_match(ireq, prereleases=False)) == 'sqlalchemy==0.9.9'
                    
22    assert str(repository.find_best_match(ireq, prereleases=False)) == 'sqlalchemy==0.9.9'
                    
23    assert str(repository.find_best_match(ireq, prereleases=True)) == 'sqlalchemy==1.0.0b5'
                    
24
                    
46    assert ({str(req) for req in dependencies} ==
                    
47            {'gnureadline', 'pyzmq>=2.1.11', 'tornado>=3.1', 'jinja2'})
                    
48
                    
51    assert ({str(req) for req in dependencies} ==
                    
52            {'gnureadline', 'pyzmq>=2.1.11', 'tornado>=3.1', 'jinja2', 'pygments', 'Sphinx>=0.3'})
                    
53
                    
                
wsgi.py https://github.com/nuance/roaring-tofu.git | Python | 24 lines
                    
5
                    
6from tornado.options import logging
                    
7import wsgiref
                    
8
                    
9from sqlalchemy import create_engine
                    
10import tornado.wsgi
                    
17
                    
18application = tornado.wsgi.WSGIApplication(handlers.app_urls.urls, **config.http_params)
                    
19
                    
                
main.py https://bitbucket.org/martijnbb/mbastiaan | Python | 110 lines
                    
40except ImportError:
                    
41    print("You can define Tornado options in settings.py. Use"\
                    
42          " the variable {APP,LISTEN}_OPTIONS")
                    
49if __name__ == '__main__':
                    
50    import tornado.web
                    
51    import os.path
                    
52
                    
53    from sqlalchemy.orm.session import sessionmaker
                    
54    from mbastiaan.utils import urldispatch, model
                    
54    from mbastiaan.utils import urldispatch, model
                    
55    from sqlalchemy import create_engine
                    
56
                    
93    app_options.update(extra_app_options)
                    
94    application = tornado.web.Application(patterns, **app_options)
                    
95
                    
                
setup.py https://gitlab.com/tlevine/urllib3 | Python | 57 lines
                    
14
                    
15# Get the version (borrowed from SQLAlchemy)
                    
16fp = open(os.path.join(base_path, 'urllib3', '__init__.py'))
                    
53          'mock',
                    
54          'tornado',
                    
55      ],
                    
                
base.py https://github.com/laoqiu/pypress-tornado.git | Python | 203 lines
                    
10import logging
                    
11import tornado.web
                    
12import tornado.locale
                    
12import tornado.locale
                    
13import tornado.escape
                    
14import tornado.ioloop
                    
50        messages.append((category, message))
                    
51        self.set_secure_cookie('flash_messages', tornado.escape.json_encode(messages))
                    
52    
                    
54        messages = self.get_secure_cookie('flash_messages')
                    
55        messages = tornado.escape.json_decode(messages) if messages else []
                    
56        return messages
                    
97
                    
98class RequestHandler(tornado.web.RequestHandler, PermissionMixIn, FlashMessageMixIn, CachedItemsMixIn):
                    
99    def on_finish(self):
                    
                
README.md https://github.com/mrowl/filmdata.git | Markdown | 31 lines
                    
3
                    
4Technically I use this to import lots of film data for my site, [filmlust](http://filmlust.com), but it's mostly just a playground for me. I see something that looks interesting and I bring it in here and build a prototype to experiment with it (mainly because that's how I learn). For instance, buried deep in the bowels of the code lies at least 3 implementations for scrapers (using tornado, gevent, and twisted. I think I'm going to settle on gevent, btw).
                    
5
                    
5
                    
6Sometimes things will reach a quiescent point and I clean it up a bit (e.g. the dynamic sqlalchemy models for automagically making tables for plugins). I guess what I'm saying is use at your own risk and feel free to contribute because there are probably many superior solutions out there and I'd like to see them.
                    
7
                    
19
                    
20* [SQLAlchemy](http://www.sqlalchemy.org) (use your preferred relational db behind it)
                    
21
                    
21
                    
22Coming soon: freebase source? box office data? sqlalchemy working?
                    
23
                    
                
python-libs.yaml https://github.com/afgane/cloudbiolinux.git | YAML | 83 lines
                    
36  - pyzmq
                    
37  - tornado
                    
38  - Twisted
                    
66  - psycopg2
                    
67  - SQLAlchemy
                    
68  # visualization
                    
                
actions.py https://github.com/araddon/demisauce.git | Python | 161 lines
                    
3import random, hashlib, string, re, urllib2
                    
4from tornado import escape
                    
5from tornado.options import define, options
                    
5from tornado.options import define, options
                    
6import tornado.httpclient
                    
7from sqlalchemy import engine, orm
                    
7from sqlalchemy import engine, orm
                    
8from sqlalchemy.sql import and_, or_, not_, func, select, text
                    
9from sqlalchemy.orm import mapper, relation, class_mapper, synonym, dynamic_loader
                    
9from sqlalchemy.orm import mapper, relation, class_mapper, synonym, dynamic_loader
                    
10from sqlalchemy.orm import scoped_session, sessionmaker, join, eagerload
                    
11try:
                    
143            elif hook and hook.category == 'event' and hook.event_type == 'webhook':
                    
144                http = tornado.httpclient.HTTPClient()
                    
145                log.debug("webhook calling url = %s" % (hook.value))
                    
                
defaults.vim https://github.com/cristibalan/.vim.git | Vim Script | 46 lines
                    
33      \ 'puppet' : ['puppet'],
                    
34      \ 'python' : ['python', 'django', 'twisted', 'sphinx', 'flask', 'tornado', 'sqlalchemy', 'numpy', 'scipy', 'salt', 'cvp'],
                    
35      \ 'r' : ['r'],
                    
                
setup.py https://bitbucket.org/angryshortone/grump-o-nado.git | Python | 51 lines
                    
24        'tornado>=4.5',
                    
25        'tornado-sqlalchemy>=0.3.3',
                    
26        'wtforms-tornado>=0.0.2',
                    
                
README.md https://bitbucket.org/engored/experiments.md | Markdown | 81 lines
                    
1One of the new features in [SQLAlchemy] 0.9 is event removal API. Basically, if
                    
2you've added an event listener, this change makes you able to remove it.
                    
74possible. I also found it to be really easy to use in integration tests for
                    
75[Tornado] without any need to modify actual handlers or monkey-patching
                    
76anything.  (It's easier to try yourself, but in case you're wondering it simply
                    
78
                    
79[SQLAlchemy]: http://www.sqlalchemy.org/
                    
80[Tornado]: http://www.tornadoweb.org/
                    
                
user.py https://github.com/araddon/demisauce.git | Python | 591 lines
                    
4from Crypto.Cipher import AES
                    
5from sqlalchemy import Column, MetaData, ForeignKey, Table, \
                    
6    func, UniqueConstraint
                    
6    func, UniqueConstraint
                    
7from sqlalchemy import Integer, String as DBString, DateTime, Boolean, \
                    
8    Text as DBText
                    
8    Text as DBText
                    
9from sqlalchemy import engine, orm
                    
10from sqlalchemy.orm import mapper, relation, class_mapper, synonym, dynamic_loader
                    
10from sqlalchemy.orm import mapper, relation, class_mapper, synonym, dynamic_loader
                    
11from sqlalchemy.sql import and_, text
                    
12from datetime import datetime
                    
18from wtforms.validators import ValidationError
                    
19from tornado import escape
                    
20from tornado.options import options
                    
                
account.py https://github.com/araddon/demisauce.git | Python | 618 lines
                    
1import logging
                    
2import tornado
                    
3import json
                    
3import json
                    
4from tornado.options import options
                    
5import tornado.escape
                    
6from datetime import datetime, timedelta
                    
7from sqlalchemy.sql import and_, or_, not_, func, select
                    
8from demisauce import model
                    
70        else:
                    
71            raise tornado.web.HTTPError(405)
                    
72    
                    
                
api.py https://github.com/araddon/demisauce.git | Python | 1040 lines
                    
1import logging, urllib, json, hashlib, re
                    
2import tornado.escape
                    
3from tornado.options import options
                    
3from tornado.options import options
                    
4from sqlalchemy.sql import and_
                    
5from sqlalchemy.orm import eagerload
                    
38                return
                    
39            raise tornado.web.HTTPError(403)
                    
40        elif not self.current_user.is_sysadmin:
                    
43                return
                    
44            raise tornado.web.HTTPError(403)
                    
45        return method(self, *args, **kwargs)
                    
                
controller.py https://bitbucket.org/macfri/find-gift.git | Python | 477 lines
                    
12from models import Gift, User, UserGift
                    
13from tornado.web import RequestHandler, HTTPError
                    
14
                    
14
                    
15from sqlalchemy import create_engine, orm
                    
16from sqlalchemy.sql import and_, between
                    
                
setup.py https://gitlab.com/Chedi/airflow.git | Python | 72 lines
                    
50        'snakebite>=2.4.13',
                    
51        'sqlalchemy>=0.9.8',
                    
52        'statsd>=3.0.1',
                    
53        'thrift>=0.9.2',
                    
54        'tornado>=4.0.2',
                    
55    ],
                    
                
IpAddress.py https://github.com/moloch--/RootTheBox.git | Python | 106 lines
                    
26from netaddr import IPAddress
                    
27from sqlalchemy import Column, ForeignKey
                    
28from sqlalchemy.orm import synonym
                    
28from sqlalchemy.orm import synonym
                    
29from sqlalchemy.types import Integer, String
                    
30from models import dbsession
                    
31from models.BaseModels import DatabaseObject
                    
32from tornado import netutil
                    
33
                    
                
standalone.py https://github.com/nuance/roaring-tofu.git | Python | 30 lines
                    
3
                    
4from sqlalchemy import create_engine
                    
5from tornado import web, ioloop, httpserver, options
                    
14
                    
15log = options.logging.getLogger('app.tornado')
                    
16app = web.Application(handlers.app_urls.urls, **config.http_params)
                    
                
emailer2.py https://gitlab.com/qb1t/mitro | Python | 78 lines
                    
21
                    
22import sqlalchemy
                    
23import sqlalchemy.exc
                    
23import sqlalchemy.exc
                    
24import sqlalchemy.ext.declarative
                    
25import sqlalchemy.orm
                    
25import sqlalchemy.orm
                    
26from sqlalchemy.pool import StaticPool
                    
27from sqlalchemy.pool import NullPool
                    
28
                    
29import tornado.options
                    
30
                    
44
                    
45    engine = sqlalchemy.create_engine(url, poolclass=sqlalchemy.pool.NullPool, echo=False)
                    
46    Session.configure(bind=engine)
                    
                
default.nix https://codeberg.org/matthiasbeyer/nixpkgs.git | Nix | 39 lines
                    
9, namedlist
                    
10, sqlalchemy
                    
11, tornado_4
                    
27
                    
28  propagatedBuildInputs = [ chardet dnspython html5-parser lxml namedlist sqlalchemy tornado_4 Yapsy ];
                    
29
                    
                
userguide.rst https://bitbucket.org/omus/apscheduler.git | ReStructuredText | 406 lines
                    
73  use if your application uses gevent
                    
74* :class:`~apscheduler.schedulers.tornado.TornadoScheduler`:
                    
75  use if you're building a Tornado application
                    
87If, however, you are in the position to choose freely, then
                    
88:class:`~apscheduler.jobstores.sqlalchemy.SQLAlchemyJobStore` on a `PostgreSQL <http://www.postgresql.org/>`_ backend is
                    
89the recommended choice due to its strong data integrity protection.
                    
130* a MongoDBJobStore named "mongo"
                    
131* an SQLAlchemyJobStore named "default" (using SQLite)
                    
132* a ThreadPoolExecutor named "default", with a worker count of 20
                    
143    from apscheduler.jobstores.mongodb import MongoDBJobStore
                    
144    from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore
                    
145    from apscheduler.executors.pool import ThreadPoolExecutor, ProcessPoolExecutor
                    
193    from apscheduler.schedulers.background import BackgroundScheduler
                    
194    from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore
                    
195    from apscheduler.executors.pool import ProcessPoolExecutor
                    
                
nova.sh https://github.com/sriprasanna/swift-scripts.git | Shell | 236 lines
                    
94    modprobe kvm
                    
95    easy_install-2.6 	twisted sqlalchemy mox greenlet carrot python-daemon eventlet tornado IPy  routes  lxml MySQL-python webob boto lockfile==0.8
                    
96    wget -c "http://python-gflags.googlecode.com/files/python-gflags-1.4.tar.gz" 
                    
                
setup.py https://github.com/blampe/Testify.git | Python | 41 lines
                    
21    ],
                    
22    install_requires=['Mock', 'PyYaml', 'SQLAlchemy', 'Tornado<3.0.0'],
                    
23    packages=["testify", "testify.contrib", "testify.utils", "testify.plugins"],
                    
                
install_conda.sh https://github.com/id774/scripts.git | Shell | 116 lines
                    
62    $CONDA install -y django
                    
63    $CONDA install -y SQLAlchemy
                    
64    $CONDA install -y lmdb
                    
81    $CONDA install -y pyper
                    
82    $CONDA install -y jinja2 tornado pyzmq
                    
83    $CONDA install -y awscli
                    
                
others.rst https://github.com/anotherjesse/nova.git | ReStructuredText | 88 lines
                    
64
                    
65easy_install-2.6     twisted sqlalchemy mox greenlet carrot daemon eventlet tornado IPy  routes  lxml MySQL-python
                    
66python-gflags need to be downloaded and installed manually, use these commands (check the exact url for newer releases ):
                    
                
models.py https://github.com/yetone/june.git | Python | 126 lines
                    
26from datetime import datetime
                    
27from sqlalchemy import Column
                    
28from sqlalchemy import Integer, String, DateTime, Text
                    
28from sqlalchemy import Integer, String, DateTime, Text
                    
29from tornado.options import options
                    
30from july.database import db
                    
                
handlers.py https://github.com/feross/Instant.fm.git | Python | 512 lines
                    
4import sys
                    
5import tornado.web
                    
6import bcrypt
                    
9import hashlib
                    
10import sqlalchemy
                    
11
                    
18
                    
19class HandlerBase(tornado.web.RequestHandler):
                    
20
                    
32    def write_error(self, status_code, **kwargs):
                    
33        """Renders error pages (called internally by Tornado)"""
                    
34        if status_code == 404:
                    
237                             .filter(model.Playlist.hide == 0)
                    
238                             .filter(sqlalchemy.not_((model.Playlist.id.in_(used_playlist_ids))))
                    
239                             .order_by(model.Playlist.views.desc())
                    
                
setting.py https://github.com/LamCiuLoeng/BookStore.git | Python | 42 lines
                    
16app_setting = {
                    
17               "tornado_setting" : {
                    
18                                    "static_path": os.path.join(app_dir, "public"),
                    
39               "db_setting" : {
                    
40                                "SQLALCHEMY_DATABASE_URI" : 'sqlite:///%s' % (os.path.join(app_dir, "database.db"))
                    
41                               }
                    
                
README.rst https://github.com/peplin/astral.git | ReStructuredText | 114 lines
                    
24
                    
25- tornado >= 1.2.1
                    
26- sqlalchemy >= 0.6.6
                    
                
server.py https://bitbucket.org/macfri/tornado-openshift-realtime-facebook.git | Python | 160 lines
                    
13
                    
14import tornado.ioloop
                    
15
                    
15
                    
16from tornado.web import RequestHandler, Application
                    
17
                    
17
                    
18from sqlalchemy.orm import sessionmaker
                    
19from sqlalchemy import create_engine
                    
26facebook_url = 'https://graph.facebook.com/'
                    
27callback_url = 'http://tornado-macfri.rhcloud.com/facebook'
                    
28
                    
159    application.listen(8080, address)
                    
160    tornado.ioloop.IOLoop.instance().start()
                    
161
                    
                
permalink_server.py https://github.com/sagemath/sagecell.git | Python | 91 lines
                    
3
                    
4This Tornado server provides a permalink service with a convenient
                    
5post/get api for storing and retrieving code.
                    
11import psutil
                    
12import tornado.httpserver
                    
13import tornado.ioloop
                    
13import tornado.ioloop
                    
14import tornado.web
                    
15
                    
19
                    
20PERMALINK_DB = "sqlalchemy"
                    
21PERMALINK_URI = "sqlite:///permalinks.db"
                    
24
                    
25class PermalinkServer(tornado.web.Application):
                    
26    def __init__(self):
                    
                
users.py https://github.com/laoqiu/pypress-tornado.git | Python | 195 lines
                    
11
                    
12import tornado.web
                    
13
                    
13
                    
14from pypress.extensions.sqlalchemy import BaseQuery
                    
15from pypress.extensions.permission import Permission, RoleNeed, UserNeed
                    
46        if user is None:
                    
47            raise tornado.web.HTTPError(404)
                    
48        return user
                    
                
blog.py https://github.com/peter-the-tea-drinker/tornado-base-example.git | Python | 88 lines
                    
3from tbone.appbase import orm
                    
4import sqlalchemy as s
                    
5
                    
13    def __init__(self, title, html, slug = None):
                    
14        import tornado.escape
                    
15        self.html = html
                    
17        if slug is None:
                    
18            slug = tornado.escape.url_escape(title)
                    
19        self.slug = slug
                    
22
                    
23import tornado.web
                    
24class BlogIndex(tornado.web.RequestHandler):
                    
39
                    
40class BlogHandler(tornado.web.RequestHandler):
                    
41    def get(self,entry):
                    
                
forms.py https://github.com/laoqiu/pypress-tornado.git | Python | 100 lines
                    
5    ~~~~~~~~~~~~~
                    
6    wtforms extensions for tornado
                    
7"""
                    
9
                    
10from tornado.escape import _unicode
                    
11
                    
28try:
                    
29    import sqlalchemy
                    
30    _is_sqlalchemy = True
                    
31except ImportError:
                    
32    _is_sqlalchemy = False
                    
33
                    
34
                    
35if _is_sqlalchemy:
                    
36    from wtforms.ext.sqlalchemy.fields import QuerySelectField, \
                    
                
RootHandler.py https://github.com/LamCiuLoeng/dreamhouse.git | Python | 246 lines
                    
3from datetime import datetime as dt
                    
4import tornado.web
                    
5from webhelpers.paginate import Page
                    
5from webhelpers.paginate import Page
                    
6from sqlalchemy import or_, and_, func
                    
7
                    
141
                    
142    @tornado.web.authenticated
                    
143    def place_order(self, **kw):
                    
173
                    
174    @tornado.web.asynchronous
                    
175    def save(self, **kw):
                    
                
Rakefile https://bitbucket.org/troter/home | Rakefile | 231 lines
                    
10  %w[hg https://bitbucket.org/danielmartins/freehg freehg],
                    
11  %w[hg https://bitbucket.org/zzzeek/sqlalchemy sqlalchemy],
                    
12  %w[hg https://bitbucket.org/mchaput/whoosh whoosh],
                    
31  %w[git git://github.com/nose-devs/nose.git nose],
                    
32  %w[git git://github.com/facebook/tornado.git tornado],
                    
33  %w[git git://github.com/Pylons/webob.git webob],
                    
48  %w[git git://github.com/adamrt/flask-evolution.git flask-evolution],
                    
49  %w[git git://github.com/mitsuhiko/flask-sqlalchemy.git flask-sqlalchemy],
                    
50  %w[hg https://bitbucket.org/leafstorm/flask-login flask-login],
                    
                
install_port_python.sh https://github.com/id774/scripts.git | Shell | 63 lines
                    
38    sudo port -d $OPERATION py$VERSION-django
                    
39    sudo port -d $OPERATION py$VERSION-sqlalchemy
                    
40    sudo port -d $OPERATION py$VERSION-readline
                    
47    sudo port -d $OPERATION py$VERSION-jinja2
                    
48    sudo port -d $OPERATION py$VERSION-tornado
                    
49    sudo port -d $OPERATION py$VERSION-zmq
                    
                
example_config.py https://github.com/peter-the-tea-drinker/tornado-base-example.git | Python | 50 lines
                    
1# see http://www.sqlalchemy.org/docs/core/engines.html#database-urls
                    
2# These are need on the server (so you need to add them)
                    
36# These are only needed by fab
                    
37APP_REPO = 'git://github.com/peter-the-tea-drinker/tornado-base-example.git'
                    
38APP_TAG = ''
                    
42
                    
43TBONE_REPO = 'git://github.com/peter-the-tea-drinker/tornado-base.git'
                    
44TBONE_TAG = ''
                    
46LOCAL_TBONE_DIR = '~/TBone'
                    
47LOCAL_APP_DIR = '~/tornado-base-example'
                    
48
                    
                
dash-at-point-autoloads.el https://github.com/adben/emacs.git | Emacs Lisp | 79 lines
                    
18
                    
19(defvar dash-at-point-mode-alist '((actionscript-mode . "actionscript") (arduino-mode . "arduino") (c++-mode . "cpp,net,boost,qt,cvcpp,cocos2dx,c,manpages") (c-mode . "c,glib,gl2,gl3,gl4,manpages") (caml-mode . "ocaml") (clojure-mode . "clojure") (coffee-mode . "coffee") (common-lisp-mode . "lisp") (cperl-mode . "perl") (css-mode . "css,bootstrap,foundation,less,awesome,cordova,phonegap") (dart-mode . "dartlang,polymerdart,angulardart") (elixir-mode . "elixir") (emacs-lisp-mode . "elisp") (enh-ruby-mode . "ruby") (erlang-mode . "erlang") (gfm-mode . "markdown") (go-mode . "go,godoc") (groovy-mode . "groovy") (haml-mode . "haml") (haskell-mode . "haskell") (html-mode . "html,svg,css,bootstrap,foundation,awesome,javascript,jquery,jqueryui,jquerym,angularjs,backbone,marionette,meteor,moo,prototype,ember,lodash,underscore,sencha,extjs,knockout,zepto,cordova,phonegap,yui") (jade-mode . "jade") (java-mode . "java,javafx,grails,groovy,playjava,spring,cvj,processing,javadoc") (js2-mode . "javascript,backbone,angularjs") (js3-mode . "nodejs") (latex-mode . "latex") (less-css-mode . "less") (lua-mode . "lua,corona") (markdown-mode . "markdown") (nginx-mode . "nginx") (objc-mode . "cpp,iphoneos,macosx,appledoc,cocoapods,cocos2dx,cocos2d,cocos3d,kobold2d,sparrow,c,manpages") (perl-mode . "perl,manpages") (php-mode . "php,wordpress,drupal,zend,laravel,yii,joomla,ee,codeigniter,cakephp,phpunit,symfony,typo3,twig,smarty,phpp,html,mysql,sqlite,mongodb,psql,redis") (processing-mode . "processing") (puppet-mode . "puppet") (python-mode . "python3,django,twisted,sphinx,flask,tornado,sqlalchemy,numpy,scipy,saltcvp") (ruby-mode . "ruby,rubygems,rails") (rust-mode . "rust") (sass-mode . "sass,compass,bourbon,neat,css") (scala-mode . "scala,akka,playscala,scaladoc") (stylus-mode . "stylus") (tcl-mode . "tcl") (tuareg-mode . "ocaml") (twig-mode . "twig") (vim-mode . "vim") (yaml-mode . "chef,ansible")) "\
                    
20Alist which maps major modes to Dash docset tags.
                    
                
sample.yaml https://github.com/rayleyva/Tinman.git | YAML | 47 lines
                    
6    site_name: Tinman
                    
7    description: A web development framework based upon Tornado
                    
8    static_path: __base_path__/tinman/static/
                    
12    Data:
                    
13        - { driver: SQLAlchemy,
                    
14            name: localhost,
                    
                
versions.cfg https://github.com/zatosource/zato.git | Config | 175 lines
                    
150springpython = 1.3.0RC1
                    
151SQLAlchemy = 0.9.4
                    
152stevedore = 0.14.1
                    
155threadpool = 1.2.7
                    
156tornado = 2.4
                    
157
                    
                
buildout.cfg https://github.com/zatosource/zato.git | Config | 347 lines
                    
198    springpython
                    
199    SQLAlchemy
                    
200    stevedore
                    
203    threadpool
                    
204    tornado
                    
205    tzlocal
                    
                
main.py https://github.com/eklitzke/toffee.git | Python | 50 lines
                    
4import yaml
                    
5import sqlalchemy
                    
6
                    
6
                    
7import tornado.httpserver
                    
8import tornado.ioloop
                    
8import tornado.ioloop
                    
9import tornado.web
                    
10
                    
34    if opts.memory_db:
                    
35        engine = sqlalchemy.create_engine('sqlite:///:memory:', echo=settings['debug'])
                    
36    else:
                    
36    else:
                    
37        engine = sqlalchemy.create_engine(settings['sqlite_db'], echo=settings['debug'])
                    
38    toffee.db.bind_engine(engine)
                    
                
api.py https://github.com/stan1y/MrHide.git | Python | 579 lines
                    
14
                    
15import tornado
                    
16import tornado.web
                    
16import tornado.web
                    
17import tornado.template
                    
18
                    
18
                    
19import sqlalchemy
                    
20import sqlalchemy.exc
                    
167        should_page, page_no, start, limit = self.page_arguments
                    
168        if should_page and isinstance(query, sqlalchemy.orm.Query):
                    
169            query = query.offset(start).limit(limit)
                    
234        
                    
235        except sqlalchemy.exc.IntegrityError as ie:
                    
236            raise mgen.error.Conflict().duplicate_object(
                    
                
rpm-dependencies.sh https://bitbucket.org/samfoster/fxhome | Shell | 88 lines
                    
72pypi2rpm.py --dist-dir=`pwd`/rpms simplejson --version=2.2.1 || exit 1
                    
73pypi2rpm.py --dist-dir=`pwd`/rpms SQLAlchemy --version=0.7.2 || exit 1
                    
74pypi2rpm.py --dist-dir=`pwd`/rpms Tempita --version=0.5.1 || exit 1
                    
74pypi2rpm.py --dist-dir=`pwd`/rpms Tempita --version=0.5.1 || exit 1
                    
75pypi2rpm.py --dist-dir=`pwd`/rpms tornado --version=2.1.1 || exit 1
                    
76pypi2rpm.py --dist-dir=`pwd`/rpms transaction --version=1.1.1 || exit 1
                    
85pypi2rpm.py --dist-dir=`pwd`/rpms zope.interface --version=3.8 || exit 1
                    
86pypi2rpm.py --dist-dir=`pwd`/rpms zope.sqlalchemy --version=0.6.1 || exit 1
                    
87
                    
                
setup.py https://github.com/Kozea/pystil.git | Python | 48 lines
                    
39    },
                    
40    install_requires=['tornado', 'pygal', 'sqlalchemy', 'psycopg2', 'momoko'],
                    
41    classifiers=[
                    
                
blog.py https://github.com/laoqiu/pypress-tornado.git | Python | 448 lines
                    
11
                    
12import tornado.web
                    
13
                    
13
                    
14from pypress.extensions.sqlalchemy import BaseQuery
                    
15from pypress.extensions.cache import cached_property, cache
                    
50        if post is None:
                    
51            raise tornado.web.HTTPError(404)
                    
52        return post
                    
                
AdminHandler.py https://github.com/LamCiuLoeng/dreamhouse.git | Python | 105 lines
                    
4from datetime import datetime as dt
                    
5import tornado.web
                    
6from tornado.httpclient import AsyncHTTPClient
                    
7from webhelpers.paginate import Page
                    
8from sqlalchemy import or_, and_
                    
9
                    
24
                    
25    @tornado.web.asynchronous
                    
26    def taobao_save(self, **kw):
                    
                
README.md https://github.com/sagemath/sagecell.git | Markdown | 93 lines
                    
44    sage/sage -pip install paramiko
                    
45    sage/sage -pip install sockjs-tornado
                    
46    sage/sage -pip install sqlalchemy
                    
                
app.py https://gitlab.com/centricwebestate/python-social-auth | Python | 71 lines
                    
4
                    
5from sqlalchemy import create_engine
                    
6from sqlalchemy.ext.declarative import declarative_base
                    
6from sqlalchemy.ext.declarative import declarative_base
                    
7from sqlalchemy.orm import scoped_session, sessionmaker
                    
8
                    
8
                    
9import tornado.httpserver
                    
10import tornado.ioloop
                    
10import tornado.ioloop
                    
11import tornado.options
                    
12import tornado.web
                    
13
                    
14from social.apps.tornado_app.models import init_social
                    
15from social.apps.tornado_app.routes import SOCIAL_AUTH_ROUTES
                    
                
setup.py https://github.com/rhettg/Testify.git | Python | 41 lines
                    
21    ],
                    
22    install_requires=['Mock', 'PyYaml', 'SQLAlchemy', 'Tornado'],
                    
23    packages=["testify", "testify.contrib", "testify.utils", "testify.plugins"],
                    
                
install.rst https://github.com/victorpantoja/mobile-social-share-server.git | ReStructuredText | 129 lines
                    
31------------------
                    
32Tornado Web Server
                    
33------------------
                    
33------------------
                    
34Tornado is an open source version of the scalable, non-blocking web server and tools that power FriendFeed. The FriendFeed application is written using a web framework that looks a bit like web.py or Google's webapp, but with additional tools and optimizations to take advantage of the underlying non-blocking infrastructure.
                    
35
                    
37
                    
38	sudo easy_install tornado
                    
39
                    
40More information:
                    
41http://www.tornadoweb.org/
                    
42
                    
43----------
                    
44SQLAlchemy
                    
45----------
                    
                
setup.py https://github.com/peplin/astral.git | Python | 34 lines
                    
21      install_requires=[
                    
22          'tornado>=1.2.1',
                    
23          'sqlalchemy>=0.6.6',
                    
                
README.rst https://github.com/foundit/Piped.git | ReStructuredText | 48 lines
                    
25
                    
26* HTTP/HTTPS with `twisted.web <http://twistedmatrix.com/trac/wiki/TwistedWeb>`_ or `Cyclone <http://cyclone.io>`_ (based on `Tornado <http://tornadoweb.org>`).
                    
27* SMTP with `twisted.mail <http://twistedmatrix.com/trac/wiki/TwistedMail>`_
                    
30* `ZooKeeper <http://zookeeper.apache.org/>`_
                    
31* Database-connectivity (with `SQLAlchemy <http://sqlalchemy.org>`_)
                    
32* Data-validation (with `FormEncode <http://www.formencode.org/>`_)
                    
                
install_pip.sh https://github.com/id774/scripts.git | Shell | 123 lines
                    
69    $SUDO $PIP install $PROXY -U django
                    
70    $SUDO $PIP install $PROXY -U SQLAlchemy
                    
71    $SUDO $PIP install $PROXY -U lmdb
                    
88    $SUDO $PIP install $PROXY -U pyper
                    
89    $SUDO $PIP install $PROXY -U jinja2 tornado pyzmq
                    
90    $SUDO $PIP install $PROXY -U awscli
                    
                
index.rst https://github.com/FeiWongReed/agatsuma.git | ReStructuredText | 61 lines
                    
15   different modules 
                    
16#. Useful services such as settings, logging, SQLAlchemy and MongoDB support, 
                    
17   pool of worker processes and more
                    
18#. Many usable extensions for 
                    
19   `Tornado Web Framework <http://www.tornadoweb.org/>`_ 
                    
20   such as URL building, sessions and more
                    
23
                    
24Note that thougn Agatsuma is intended to be extension for Tornado 
                    
25Framework many Agatsuma's components may be used in projects that 
                    
25Framework many Agatsuma's components may be used in projects that 
                    
26are not using Tornado and not even related to Web.
                    
27
                    
50   interfaces
                    
51   tornado
                    
52
                    
                
 

Source

Language