100+ results for 'sqlalchemy tornado'
Not the results you expected?
Alerts.py (https://gitlab.com/fdemian/Shelob) Python · 160 lines
Story.py (https://gitlab.com/fdemian/Shelob) Python · 113 lines
env.py (https://gitlab.com/fdemian/Shelob) Python · 86 lines
1 from __future__ import with_statement
2 from alembic import context
3 from sqlalchemy import engine_from_config, pool
4 from logging.config import fileConfig
5 from tornado.options import define, options, parse_config_file
52 """
53 #url = config.get_main_option("sqlalchemy.url")
54 url = get_database_url()
68 """
69 config_section = config.get_section(config.config_ini_section)
70 config_section["sqlalchemy.url"] = get_database_url()
72 connectable = engine_from_config(
Comments.py (https://gitlab.com/fdemian/Shelob) Python · 203 lines
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...)
4 PYTHONPATH=/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:
6 #Get path of script
GlobalOptions.py (https://gitlab.com/fdemian/Shelob) Python · 118 lines
setup.py (https://bitbucket.org/bendikro/deluge-yarss-plugin.git) Python · 86 lines
__init__.py (https://github.com/thecowboy/apollo.git) Python · 103 lines
29 import logging
31 from sqlalchemy.engine import create_engine
33 from apollo.server.models.meta import bindSession
35 from tornado.options import define, options, parse_config_file, parse_command_line
36 from tornado.options import Error as OptionsError
51 def setupOptions():
52 """
53 Initialize options for use with Tornado.
54 """
55 define("debug", default=False, help="run in debug mode", type=bool, metavar="DEBUG")
83 def setupDBSession():
84 """
85 Set up the session for SQLAlchemy.
86 """
87 # netloc
index.py (https://gitlab.com/sphaso/weiqi.gs) Python · 79 lines
README.rst (https://gitlab.com/carmes/aiomysql) ReStructuredText · 146 lines
19 Internally **aiomysql** is copy of PyMySQL, underlying io calls switched
20 to async, basically ``yield from`` and ``asyncio.coroutine`` added in
21 proper places)). `sqlalchemy` support ported from aiopg_.
97 Example of SQLAlchemy optional integration
98 ------------------------------------------
99 Sqlalchemy support has been ported from aiopg_ so api should be very familiar
104 import asyncio
105 from aiomysql.sa import create_engine
106 import sqlalchemy as sa
144 .. _aiopg: https://github.com/aio-libs/aiopg
145 .. _PyMySQL: https://github.com/PyMySQL/PyMySQL
146 .. _Tornado-MySQL: https://github.com/PyMySQL/Tornado-MySQL
install.sh (https://github.com/mkb218/wub-machine.git) Shell · 133 lines
45 apt-get install git-core python-setuptools python-dev build-essential python-pip
47 # Install server-specific stuff: SQLAlchemy, Tornadio, Tornadio from HEADs
48 apt-get install python-mysqldb
49 pip install sqlalchemy
51 git clone https://github.com/facebook/tornado.git
52 cd tornado
53 python setup.py install
54 cd ..
55 rm -rf tornado/
57 git clone https://github.com/MrJoes/tornadio.git
87 hash pip 2>&- || easy_install pip
89 # Install server-specific stuff: SQLAlchemy, Tornadio, Tornadio from HEADs
90 pip install python-mysqldb
91 pip install sqlalchemy
Activation.py (https://gitlab.com/fdemian/Shelob) Python · 118 lines
README.rst (https://github.com/fhats/partify.git) ReStructuredText · 21 lines
12 * Flask, a python microframework for web development
13 * Flask-WTF, a Flask extension for WTForms supporpt
14 * Flask-SQLAlchemy, a Flask extension for SQLAlchemy support
15 * SQLAlchemy, a SQL abstraction framework
16 * WTForms
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
OAuthService.py (https://gitlab.com/fdemian/Shelob) Python · 91 lines
1 from tornado import gen
2 from .FacebookService import FacebookAuthService
3 from .GoogleService import GoogleAuthService
4 from api.authentication.AuthExceptions import OAuthFailedException, NoSuchServiceException
5 from sqlalchemy.orm.exc import MultipleResultsFound
6 from api.model.sessionHelper import get_session
7 from api.model.models import User, OAuthAccount
TwitterService.py (https://gitlab.com/fdemian/Shelob) Python · 53 lines
base.py (https://github.com/garethdmm/gryphon.git) Python · 152 lines
4 import traceback
6 import sqlalchemy.exc
7 import tornado.web
8 from tornadotoad import api
9 from tornadotoad import my
20 class BaseHandler(tornado.web.RequestHandler):
21 """
22 A class to collect common handler methods - all other handlers should subclass this
49 return super(BaseHandler, self).send_error(status_code, **kwargs)
51 tornado_toad = api.TornadoToad()
52 exception = kwargs.get('exc_info')
Dockerfile (https://gitlab.com/rbax81/VisTrails) Dockerfile · 54 lines
12 apt-get install -y python python-dateutil python-dev python-docutils \
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 \
16 python-xlrd python-xlwt
18 apt-get install -y python-qt4 python-qt4-gl python-qt4-sql python-vtk \
19 imagemagick xvfb
20 # Install IPython deps. python-tornado is too old, so we'll get it from pip
21 RUN \
22 apt-get install -y python-zmq
37 . venv/bin/activate && \
38 pip install -r requirements.txt && \
39 pip install 'tornado>=4.0' jsonschema
41 # Warning: using 'setup.py develop' will make setuptools add dist-packages to
FacebookService.py (https://gitlab.com/fdemian/Shelob) Python · 103 lines
setup.py (https://gitlab.com/czm1129/pyspider) Python · 124 lines
app_frontend_base.pp (https://gitlab.com/karambir/zulip) Puppet · 136 lines
16 # Needed for mock objects in decorators
17 "python-mock",
18 # Tornado dependencies
19 "python-tornado",
20 "python-sockjs-tornado",
21 # Needed for our fastcgi setup
22 "python-flup",
30 "python-psycopg2",
31 # Needed for building complex DB queries
32 "python-sqlalchemy",
33 # Needed for integrations
34 "python-twitter",
110 notify => Service["supervisor"],
111 }
112 file { "/home/zulip/tornado":
113 ensure => directory,
114 owner => "zulip",
setup.py (https://github.com/jupyter/nbgrader.git) Python · 108 lines
GoogleService.py (https://gitlab.com/fdemian/Shelob) Python · 80 lines
setup.py (https://gitlab.com/e0/luigi) Python · 90 lines
39 install_requires = [
40 'tornado>=4.0,<5',
41 'python-daemon<3.0',
42 ]
44 if os.environ.get('READTHEDOCS', None) == 'True':
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
48 install_requires.remove('python-daemon<3.0')
ROADMAP.md (https://github.com/graphql-python/graphene.git) Markdown · 54 lines
46 | ...[flask](https://github.com/graphql-python/flask-graphql) | | | | | |
47 | ...[webob](https://github.com/graphql-python/webob-graphql) | | | | | |
48 | ...[tornado](https://github.com/graphql-python/graphene-tornado) | ewhauser | | PR created | ✅ | |
49 | ...[ws](https://github.com/graphql-python/graphql-ws) | Cito/dfee | | ✅ | ✅ | |
50 | ...[gae](https://github.com/graphql-python/graphene-gae) | ekampf | | PR created | ✅ | |
51 | ...[sqlalchemy](https://github.com/graphql-python/graphene-sqlalchemy) | jnak/Nabell | ✅ | ✅ | ✅ | |
52 | ...[mongo](https://github.com/graphql-python/graphene-mongo) | | | ✅ | ✅ | |
53 | ...[relay-py](https://github.com/graphql-python/graphql-relay-py) | Cito | | | | |
Drafts.py (https://gitlab.com/fdemian/Shelob) Python · 281 lines
__init__.py (https://github.com/araddon/demisauce.git) Python · 23 lines
1 #!/usr/bin/env python
2 import tornado.options
3 from tornado.options import define, options
20 define("port", default=4950, help="run on the given port", type=int)
22 define("sqlalchemy_default_url", default=("mysql://root:demisauce@192.168.1.7/demisauce"))
23 define("sqlalchemy_default_echo", default=True, type=bool,help="run in echo mode")
base.py (https://gitlab.com/forevercat/Project) Python · 75 lines
4 import json
6 import tornado.web
7 from tornado import httputil
9 import sqlalchemy
10 from sqlalchemy import create_engine
11 from sqlalchemy.orm import sessionmaker
12 from sqlalchemy import func
20 sys.setdefaultencoding('utf-8')
22 class BaseHandler(tornado.web.RequestHandler):
23 __model__ = '__base__'
README.rst (https://github.com/araddon/demisauce.git) ReStructuredText · 67 lines
10 Powered By `Tornado <http://www.tornadoweb.org>`_, MySql, `Gearman <http://www.gearman.org>`_, `Redis <http://www.tornadoweb.org>`_
12 Make a config file as follows::
27 Development
28 ======================
29 After making changes to the model, if you are using SQLAlchemy to
30 create db, you can write changes to db using: (runs websetup.py setup_config())::
__init__.py (https://github.com/stan1y/MrHide.git) Python · 50 lines
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)
118 MySQL
164 * PyPy trunk: about 1.35x faster than CPython
166 Tornado web app
167 ---------------
setup.py (https://bitbucket.org/marcelm/exomate.git) Python · 69 lines
36 ./exomate/ {prefix}/exomate/
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
40 chmod -R o+r {prefix}
54 scripts = [ s for s in glob(os.path.join("bin", "exomate-*")) if not s.endswith('~') ],
55 install_requires = [
56 "SQLalchemy >= 0.8.0b2",
57 "Flask-SQLAlchemy"
models.py (https://github.com/openhatch/oh-mainline.git) Python · 61 lines
1 """Tornado SQLAlchemy ORM models for Social Auth"""
2 from sqlalchemy import Column, Integer, String, ForeignKey
5 from social.utils import setting_name, module_member
6 from social.storage.sqlalchemy_orm import SQLAlchemyUserMixin, \
7 SQLAlchemyAssociationMixin, \
13 class TornadoStorage(BaseSQLAlchemyStorage):
14 user = None
15 nonce = None
44 return User
46 class Nonce(_AppSession, Base, SQLAlchemyNonceMixin):
47 """One use numbers"""
48 pass
create_database.py (https://gitlab.com/fdemian/Shelob) Python · 38 lines
index.html (https://bitbucket.org/frank418/tblog.git) HTML · 123 lines
69 <li><a href="http://0418.me">Flask Blog</a></li>
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>
79 </div>
83 <div class="row-fluid marketing">
84 <div class="span6">
85 <h4>Tornado</h4>
87 <p>强力异步网络框架兼Web开发框架</p>
sessionHelper.py (https://gitlab.com/fdemian/Shelob) Python · 35 lines
index.py (https://gitlab.com/duonggit/weiqi.gs) Python · 82 lines
web_server.py (https://github.com/kramer314/sagecell.git) Python · 64 lines
10 from trusted_kernel_manager import TrustedMultiKernelManager as TMKM
11 from db_sqlalchemy import DB
13 # Tornado / zmq imports
14 import zmq
15 from zmq.eventloop import ioloop
16 import tornado.web
18 ioloop.install()
22 _kernel_id_regex = r"(?P<kernel_id>\w+-\w+-\w+-\w+-\w+)"
24 # Tornado Web Server
25 import handlers
753ec9bc0d27_init_v1_0.py (https://github.com/xtg20121013/blog_xtg.git) Python · 170 lines
index.rst (https://gitlab.com/carmes/aiomysql) ReStructuredText · 141 lines
10 .. _asyncio: http://docs.python.org/3.4/library/asyncio.html
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
21 Internally **aiomysql** is copy of PyMySQL, underlying io calls switched
22 to async, basically ``yield from`` and ``asyncio.coroutine`` added in
23 proper places. :term:`sqlalchemy` support ported from aiopg_.
85 :mod:`aiomysql.sa` module is **optional** and requires
86 :term:`sqlalchemy`. You can install *sqlalchemy* by running::
88 pip3 install sqlalchemy
py3torch3cuda9.yml (https://github.com/pcyin/tranX.git) YAML · 124 lines
__init__.py (https://gitlab.com/duonggit/weiqi.gs) Python · 42 lines
17 import os
19 from sqlalchemy.orm import scoped_session
20 from weiqi import settings
21 from weiqi.db import Session, create_db, create_schema
33 # Patch the `weiqi.db.sessions` contextmanager to use the same session as other parts of the testing framework, such as
34 # in factory boy.
35 # This is mainly used to test tornado request handlers.
36 from contextlib import contextmanager
37 @contextmanager
python-libs.yaml (https://github.com/pjotrp/cloudbiolinux.git) YAML · 83 lines
utils.py (https://github.com/quantopian/pgcontents.git) Python · 141 lines
setup.py (https://github.com/fhats/partify.git) Python · 34 lines
GithubService.py (https://gitlab.com/fdemian/Shelob) Python · 112 lines
1 import tornado
2 import tornado.web
3 from .GithubMixin import GithubOAuth2Mixin
4 from tornado.web import RequestHandler
5 from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound
6 from api.model.sessionHelper import get_session
7 from api.model.models import User
8 from tornado.httpclient import AsyncHTTPClient
9 from urllib.parse import urlencode
15 class GithubAuthService(RequestHandler, GithubOAuth2Mixin):
17 @tornado.gen.coroutine
18 def get(self, auth_code, redirect_url):
main.py (https://gitlab.com/forevercat/Project) Python · 60 lines
3 import api
4 import types
5 import tornado.ioloop
6 import tornado.web
7 import sqlalchemy
8 from sqlalchemy import create_engine
9 from sqlalchemy.orm import sessionmaker
10 from sqlalchemy import func
14 sys.setdefaultencoding('utf-8')
16 class ESApplication(tornado.web.Application):
17 def __init__(self, api_entry, **settings):
18 handlers = self.load_handlers(api_entry)
models.py (https://github.com/priyaank/python-social-auth.git) Python · 86 lines
1 """Tornado SQLAlchemy ORM models for Social Auth"""
2 from sqlalchemy import Column, Integer, String, ForeignKey
6 from social.utils import setting_name, module_member
7 from social.storage.sqlalchemy_orm import SQLAlchemyUserMixin, \
8 SQLAlchemyAssociationMixin, \
9 SQLAlchemyNonceMixin, \
10 SQLAlchemyCodeMixin, \
11 BaseSQLAlchemyStorage
12 from social.apps.tornado_app.fields import JSONType
15 class TornadoStorage(BaseSQLAlchemyStorage):
16 user = None
17 nonce = None
TwitterRedirect.py (https://gitlab.com/fdemian/Shelob) Python · 63 lines
1 from tornado import gen
2 from tornado.web import RequestHandler
3 from tornado.auth import TwitterMixin, AuthError
4 from tornado.escape import json_encode
5 from api.model.sessionHelper import get_session
6 from api.model.models import User
7 from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound
Categories.py (https://gitlab.com/fdemian/Shelob) Python · 201 lines
2 from api.model.models import Category, Story
3 from api.authentication.AuthenticatedHandler import AuthenticatedHandler
4 from tornado.web import RequestHandler
5 from tornado.gen import coroutine
6 from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
7 from api.Utils import authenticated
default.nix (https://github.com/NixOS/nixpkgs-channels.git) Nix · 64 lines
NoticiaViews.py (https://hg.codeplex.com/hackathon) Python · 97 lines
package.py (https://github.com/LLNL/spack.git) Python · 35 lines
README.md (https://gitlab.com/lcp0578/FrameworkBenchmarks.git) Markdown · 126 lines
71 ### Gunicorn + Tornado
73 uWSGI + PyPy is difficult to setup.
74 Meinheld doesn't so fast with PyPy because it uses Python/C API heavily.
75 So we use Tornado as HTTP/WSGI server.
77 It supports keep-alive. So it have nice performance about json or plaintext benchmark.
92 Simple json or plaintext test is enough.
94 If your framework uses SQLAlchemy, Flask may be enough to know performance of SQLAlchemy.
appbase.py (https://github.com/peter-the-tea-drinker/tornado-base.git) Python · 57 lines
1 import config
2 import sqlalchemy
3 import sqlalchemy.orm
4 from sqlalchemy.ext.declarative import declarative_base
6 # to upgrade live
17 def __init__(self):
18 self.engine = None
19 self.Session = sqlalchemy.orm.sessionmaker()
20 self.Base = declarative_base()
26 orm = ORM()
27 orm.initialize(sqlalchemy.create_engine(config.DB))#, encoding='utf-8'))
29 sql = sqlalchemy
config.py (https://github.com/qunarcorp/open_dnsdb.git) Python · 137 lines
96 default='sync',
97 help='The type of workers to use.',
98 choices=('sync', 'eventlet', 'gevent', 'tornado'))
99 ], 'gunicorn')
129 self.SECRET_KEY = os.environ.get('SECRET_KEY') or CONF.etc.secret_key
130 self.SQLALCHEMY_DATABASE_URI = CONF.DB.connection
131 self.SQLALCHEMY_TRACK_MODIFICATIONS = False
134 # SECRET_KEY = os.environ.get('SECRET_KEY') or CONF.etc.secret_key
135 # SQLALCHEMY_DATABASE_URI = CONF.DB.connection
136 # SQLALCHEMY_TRACK_MODIFICATIONS = False
HOWTO.md (https://bitbucket.org/mixedpower/tordos.git) Markdown · 51 lines
17 |-templates
18 |-tordos -- web项目python模块的顶层包
19 |-core -- 放了一些收集到tornado做web项目需要用到的外部支持模块
20 |-http
21 |-base_request.py -- 每个RequestHandler的父类,有自己的特定修改,可在此处做修改
24 |-session.py -- session的支持:memcached, redis, mongodb, dict等方式(配置参数SESSION_TYPE)
25 |-orm
26 |-sqlalchemy.py -- 集成SQLAlchemy orm框架(配置参数:ORM_TYPE)
27 |-peewee.py -- 集成peeweee orm框架
28 |-mongo.py -- 集成mongodb数据库的支持
41 |-controller.py -- 每个请求的处理handler
42 |-model.py -- 该模块用到的自定义数据类
43 |-uimodules.py -- 若使用了tornado模板,可以定义该文件
44 |-static
45 |-template
2017_04_08-gunicorn.md (https://github.com/jiajunhuang/blog.git) Markdown · 56 lines
README.rst (https://github.com/thecowboy/apollo.git) ReStructuredText · 47 lines
2019_03_29-python_golang_best_practice.md (https://github.com/jiajunhuang/blog.git) Markdown · 66 lines
25 - gunicorn + gevent异步比asyncio/tornado等更加方便
26 - [Flask](http://flask.pocoo.org/) 总体来说是一个好用的web框架
27 - ORM使用 [SQLAlchemy](https://www.sqlalchemy.org/) ,migration使用 [alembic](https://alembic.sqlalchemy.org/en/latest/)
28 - 参数校验使用 [marshmallow](https://github.com/marshmallow-code/marshmallow)
29 - 异步任务使用 gevent + python-rq,celery并发一高就容易遇到莫名假死的问题
README.rst (https://github.com/fantix/gino.git) ReStructuredText · 93 lines
30 GINO - GINO Is Not ORM - is a lightweight asynchronous ORM built on top of
31 SQLAlchemy_ core for Python asyncio_. GINO 1.0 supports only PostgreSQL_ with asyncpg_.
33 * Free software: BSD license
73 .. _SQLAlchemy: https://www.sqlalchemy.org/
74 .. _asyncpg: https://github.com/MagicStack/asyncpg
75 .. _PostgreSQL: https://www.postgresql.org/
77 .. _Alembic: https://bitbucket.org/zzzeek/alembic
78 .. _Sanic: https://github.com/channelcat/sanic
79 .. _Tornado: http://www.tornadoweb.org/
80 .. _Quart: https://gitlab.com/pgjones/quart/
81 .. _English: https://python-gino.org/docs/en/
pyproject.toml (https://github.com/DataDog/dd-trace-py.git) TOML · 164 lines
activity.py (https://github.com/bcampbell/unsourced.git) Python · 62 lines
setup.py (https://github.com/uber-common/opentracing-python-instrumentation.git) Python · 66 lines
34 'future',
35 'wrapt',
36 'tornado>=4.1,<6',
37 'contextlib2',
38 'opentracing>=2,<3',
51 'MySQL-python; python_version=="2.7"',
52 'psycopg2-binary',
53 'sqlalchemy>=1.3.7',
54 'pytest',
55 'pytest-cov',
56 'pytest-localserver',
57 'pytest-mock',
58 'pytest-tornado',
59 'basictracer>=3,<4',
60 'redis',
config.py (https://github.com/araddon/demisauce.git) Python · 120 lines
1 import logging, json
2 from sqlalchemy import Column, MetaData, ForeignKey, Table, \
3 func, UniqueConstraint
4 from sqlalchemy import Integer, String as DBString, DateTime, Boolean, \
5 Text as DBText
6 from sqlalchemy import engine, orm
7 from sqlalchemy.orm import mapper, relation, class_mapper, synonym, dynamic_loader
8 from sqlalchemy.sql import and_, text
9 from datetime import datetime
10 import formencode
14 IntegerField, validators
15 from wtforms.validators import ValidationError
16 from tornado import escape
17 from tornado.options import options
proxy.py (https://github.com/dropbox/merou.git) Python · 144 lines
tranx-py2.yml (https://github.com/pcyin/tranX.git) YAML · 123 lines
__init__.py (https://github.com/uber-common/opentracing-python-instrumentation.git) Python · 133 lines
Makefile (https://github.com/freebsd/freebsd-ports.git) Makefile · 25 lines
__init__.py (https://github.com/cliqz-oss/browser-f.git) Python · 183 lines
run_server.py (https://gitlab.com/lotaku/tornado_jinja.git) Python · 69 lines
6 from july.web import init_options, run_server, JulyHandler
7 import motor
8 import tornado
9 from tornado.options import options
29 # reset_option('locale_path', os.path.join(PROJDIR, 'locale'))
30 #todo ?
31 reset_option('sqlalchemy_kwargs', {}, type=dict)
33 def create_application():
64 init_options()
65 parse_config_file(os.path.join(PROJDIR, 'etc/server.conf'))
66 tornado.options.parse_command_line()
67 application = create_application()
test_request_handlers.py (https://github.com/siddhantgoel/tornado-sqlalchemy.git) Python · 94 lines
requirements.in (https://github.com/python/performance.git) Autoconf · 33 lines
setup.py (https://github.com/Nextdoor/ndscheduler.git) Python · 91 lines
base.py (https://github.com/GuozhuHe/webspider.git) Python · 205 lines
3 import logging
5 from sqlalchemy import MetaData, inspect, func, text
6 from sqlalchemy.ext.declarative import declarative_base
7 from tornado.util import ObjectDict
9 from webspider.utils import sql
43 def dict(self):
44 """sqlalchemy object -> dict"""
45 columns = self.__table__.columns.keys()
46 return ObjectDict((column, getattr(self, column)) for column in columns)
README.md (https://github.com/quangIO/FrameworkBenchmarks.git) Markdown · 46 lines
generate_envs.py (https://github.com/MolSSI/QCFractal.git) Python · 146 lines
index.rst (https://github.com/aio-libs/aiomysql.git) ReStructuredText · 141 lines
10 .. _asyncio: http://docs.python.org/3.5/library/asyncio.html
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
21 Internally **aiomysql** is copy of PyMySQL, underlying io calls switched
22 to async, basically ``await`` and ``async def coroutine`` added in
23 proper places. :term:`sqlalchemy` support ported from aiopg_.
85 :mod:`aiomysql.sa` module is **optional** and requires
86 :term:`sqlalchemy`. You can install *sqlalchemy* by running::
88 pip3 install sqlalchemy
log.py (https://github.com/andrewcooke/choochoo.git) Python · 68 lines
Dockerfile (https://github.com/keylime/keylime.git) Dockerfile · 68 lines
install.rst (https://github.com/dask/dask.git) ReStructuredText · 140 lines
32 You can also install only the Dask library. Modules like ``dask.array``,
33 ``dask.dataframe``, ``dask.delayed``, or ``dask.distributed`` won't work until you also install NumPy,
34 Pandas, Toolz, or Tornado, respectively. This is common for downstream library
35 maintainers::
47 We have these options so that users of the lightweight core Dask scheduler
48 aren't required to download the more exotic dependencies of the collections
49 (Numpy, Pandas, Tornado, etc.).
115 | s3fs | >=0.4.0 | Reading from Amazon S3 |
116 +---------------+----------+--------------------------------------------------------------+
117 | sqlalchemy | | Writing and reading from SQL databases |
118 +---------------+----------+--------------------------------------------------------------+
119 | cytoolz/toolz | >=0.8.2 | Utility functions for iterators, functions, and dictionaries |
Slides.js (https://bitbucket.org/benluo/shlug_slides_201205) JavaScript · 113 lines
17 {content:"Enyo 简介"},
18 {content:"Python Web 框架选型"},
19 {content:"Enyo + Zerkzeug + SQLAlchemy 框架"},
20 {content:"问答"}
21 ]
88 {tag: "a href='http://www.pylonsproject.org/projects'", content:"Pyride -- 轻量级 Python Web 框架,Zope 血统"},
89 {tag: 'br'},
90 {tag: "a href='http://http://www.tornadoweb.org/'", content:"Tornado -- 从 FaceBook 来的 Python Web 框架"},
91 {tag: 'br'},
92 {tag: "a href='http://Zerkzeug.pocoo.org'", content:"Zerkzeug -- Flask 的底层库"},
93 {tag: 'br'},
94 {tag: "a href='http://http://www.sqlalchemy.org/'", content:"SQLAlchemy -- Python 中最流行的 ORM 库"}
95 ]
96 },
UsuarioViews.py (https://hg.codeplex.com/hackathon) Python · 116 lines
INSTALL.sh (https://github.com/hisaki/nova-scripts.git) Shell · 141 lines
45 echo 'tornado-1.1'
46 wget http://github.com/downloads/facebook/tornado/tornado-1.1.tar.gz
47 echo 'gflags'
48 wget http://google-gflags.googlecode.com/files/gflags-1.3.tar.gz
53 echo 'python-sqlalchemy'
54 wget http://downloads.sourceforge.net/project/sqlalchemy/sqlalchemy/0.6.5/SQLAlchemy-0.6.5.tar.gz
55 popd
57 #echo "- Manual Install for python-redis, tornado, gflags and python-gflags" >> $TODO_FILE
58 echo "- Manual Install for tornado, gflags, python-gflags,
59 python-eventlet and python-sqlalchemy from $TEMP_DIR
60 If you use Ubuntu 10.10, you can install with apt-get" >> $TODO_FILE
CHANGELOG.rst (https://github.com/siddhantgoel/tornado-sqlalchemy.git) ReStructuredText · 82 lines
8 1. Drop :code:`session_factory` and :code:`make_session_factory` in favor of
9 the new :code:`SQLAlchemy` instance
10 2. Drop :code:`declarative_base` in favor of the new :code:`SQLAlchemy.Model`
58 v0.2.2
59 ------
60 - Support SQLAlchemy's :code:`use_native_unicode` argument
61 - Remove unused code
62 - Improve documentation
81 .. _@dingyaguang117: https://github.com/dingyaguang117
82 .. _UPGRADING.rst: https://github.com/siddhantgoel/tornado-sqlalchemy/blob/master/UPGRADING.rst
index.rst (https://github.com/DataDog/dd-trace-py.git) ReStructuredText · 158 lines
119 | :ref:`sanic` | >= 19.6.0 | Yes [4]_ |
120 +--------------------------------------------------+---------------+----------------+
121 | :ref:`sqlalchemy` | >= 1.0 | No |
122 +--------------------------------------------------+---------------+----------------+
123 | :ref:`tornado` | >= 4.0 | No |
application.py (https://github.com/ss1917/ops_sdk.git) Python · 73 lines
9 from shortuuid import uuid
10 from tornado import httpserver, ioloop
11 from tornado import options as tnd_options
12 from tornado.options import options, define
13 from tornado.web import Application as tornadoApp
14 from tornado.web import RequestHandler
18 define("addr", default='0.0.0.0', help="run on the given ip address", type=str)
19 define("port", default=8000, help="run on the given port", type=int)
20 define("progid", default=str(uuid()), help="tornado progress id", type=str)
22 urls_meta_list = []
25 class Application(tornadoApp):
26 """ 定制 Tornado Application 集成日志、sqlalchemy 等功能 """
README.rst (https://github.com/agronholm/apscheduler.git) ReStructuredText · 76 lines
33 * Memory
34 * `SQLAlchemy <http://www.sqlalchemy.org/>`_ (any RDBMS supported by SQLAlchemy works)
35 * `MongoDB <http://www.mongodb.org/>`_
36 * `Redis <http://redis.io/>`_
42 * `asyncio <http://docs.python.org/3.4/library/asyncio.html>`_ (:pep:`3156`)
43 * `gevent <http://www.gevent.org/>`_
44 * `Tornado <http://www.tornadoweb.org/>`_
45 * `Twisted <http://twistedmatrix.com/>`_
base.py (https://github.com/dropbox/merou.git) Python · 225 lines
7 from sshpubkeys import SSHKey
8 from ssl import SSLContext
9 from sqlalchemy.orm import Session
10 from tornado.httpserver import HTTPRequest
132 Args:
133 request: The request being handled (None for non-Tornado exceptions)
134 status: The response status (None for non-Tornado exceptions)
165 status: the response status of the request (e.g., 200, 404, etc.)
166 duration_ms: the request processing latency
167 request: the Tornado request that was handled
168 """
169 pass
index.md (https://github.com/encode/databases.git) Markdown · 104 lines
12 Databases gives you simple asyncio support for a range of databases.
14 It allows you to make queries using the powerful [SQLAlchemy Core][sqlalchemy-core]
15 expression language, and provides support for PostgreSQL, MySQL, and SQLite.
17 Databases is suitable for integrating against any async Web framework, such as [Starlette][starlette],
18 [Sanic][sanic], [Responder][responder], [Quart][quart], [aiohttp][aiohttp], [Tornado][tornado], or [FastAPI][fastapi].
20 **Community**: [https://discuss.encode.io/c/databases](https://discuss.encode.io/c/databases)
101 [quart]: https://gitlab.com/pgjones/quart
102 [aiohttp]: https://github.com/aio-libs/aiohttp
103 [tornado]: https://github.com/tornadoweb/tornado
104 [fastapi]: https://github.com/tiangolo/fastapi
fpage.py (https://github.com/fy0/fpage.git) Python · 140 lines
16 def help():
17 print('FPage v1.2 - tornado classic project generator(cli)')
18 print('repo: github.com/fy0/fpage\n')
19 print('Usage:')
31 if tmpl_engine == 'mako':
32 shutil.rmtree(join(project_dir, 'templates_jinja2'))
33 shutil.rmtree(join(project_dir, 'templates_tornado'))
34 elif tmpl_engine == 'jinja2':
35 shutil.rmtree(join(project_dir, 'templates'))
36 shutil.rmtree(join(project_dir, 'templates_tornado'))
37 shutil.move(join(project_dir, 'templates_jinja2'), join(project_dir, 'templates'))
38 elif tmpl_engine == 'tornado':
README.md (https://github.com/mlrun/mlrun.git) Markdown · 116 lines
setup.py (https://github.com/cliqz-oss/browser-f.git) Python · 58 lines
setup.py (https://github.com/MolSSI/QCFractal.git) Python · 79 lines
deeplearningproject_environment.yml (https://github.com/Spandan-Madan/DeepLearningProject.git) YAML · 100 lines
conda_gpu.yaml (https://github.com/miguelgfierro/sciblog_support.git) YAML · 43 lines
22 - scipy==1.1.0
23 - scikit-learn==0.19.1
24 - tornado==4.5.3
25 - jupyter==1.0.0
26 # In case you want to install LigthGBM with GPU, make sure you add the correct path
30 - asyncio==3.4.3
31 - aiohttp==2.0.3
32 - SQLAlchemy==1.2.4
33 # For websockets, add flask-socketio, gevent-websocket, wsaccel and ujson
34 - flask-socketio>=3.0.1
SupportPlan.md (https://github.com/naver/pinpoint-c-agent.git) Markdown · 29 lines
6 django | ✔ | https://github.com/django/django/<br>star:50.8k
7 flask | ✔ | https://github.com/pallets/flask<br>star:51.3k
8 tornado| ✔ | https://github.com/tornadoweb/tornado<br>star:19.3k
9 aiohttp| todo |https://github.com/aio-libs/aiohttp<br>star:10k
10 bottle| todo | https://github.com/bottlepy/bottle<br>star:6.9k
22 PyMongo| todo | -
23 UrlLib| todo | -
24 SQLAlchemy| todo | -
25 Celery| todo | -
26 Scrapy| todo | -
asset_operational_audit_handler.py (https://github.com/opendevops-cn/codo-cmdb.git) Python · 67 lines
9 import json
10 from sqlalchemy import or_
11 from libs.base_handler import BaseHandler
12 from models.server import model_to_dict, AssetOperationalAudit
13 from websdk.db_context import DBContext
14 import tornado.web
15 import time, datetime
16 from dateutil.relativedelta import relativedelta
19 class AssetOperationalAuditHandler(tornado.web.RequestHandler):
20 def get(self, *args, **kwargs):
21 id = self.get_argument('id', default=None, strip=True)
map-DevLang-Python.md (https://github.com/TeamStuQ/skill-map.git) Markdown · 156 lines
app.py (https://github.com/klen/py-frameworks-bench.git) Python · 103 lines
6 import logging
8 from tornado import web, gen, httpclient, httpserver, ioloop, template
10 logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG)
30 from sqlalchemy import create_engine, schema, Column
31 from sqlalchemy.sql.expression import func
32 from sqlalchemy.types import Integer, String
33 from sqlalchemy.orm import sessionmaker
34 from sqlalchemy.ext.declarative import declarative_base
36 engine = create_engine('postgres://benchmark:benchmark@%s:5432/benchmark' % HOST, pool_size=10)
G.py (https://github.com/xiaowan/pyadmin.git) Python · 56 lines
__init__.py (https://github.com/andrewcooke/choochoo.git) Python · 42 lines
conda.yaml (https://github.com/miguelgfierro/sciblog_support.git) YAML · 40 lines
managerbase.py (https://github.com/quantopian/pgcontents.git) Python · 101 lines
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/>`_
31 * `Redis <http://redis.io/>`_
37 * `asyncio <http://docs.python.org/3.4/library/asyncio.html>`_ (:pep:`3156`)
38 * `gevent <http://www.gevent.org/>`_
39 * `Tornado <http://www.tornadoweb.org/>`_
40 * `Twisted <http://twistedmatrix.com/>`_
41 * `Qt <http://qt-project.org/>`_ (using either `PyQt <http://www.riverbankcomputing.com/software/pyqt/intro>`_
setup.py (https://github.com/dalibo/temboard.git) Python · 85 lines
README.md (https://github.com/encode/databases.git) Markdown · 106 lines
12 Databases gives you simple asyncio support for a range of databases.
14 It allows you to make queries using the powerful [SQLAlchemy Core][sqlalchemy-core]
15 expression language, and provides support for PostgreSQL, MySQL, and SQLite.
17 Databases is suitable for integrating against any async Web framework, such as [Starlette][starlette],
18 [Sanic][sanic], [Responder][responder], [Quart][quart], [aiohttp][aiohttp], [Tornado][tornado], or [FastAPI][fastapi].
20 **Documentation**: [https://www.encode.io/databases/](https://www.encode.io/databases/)
103 [quart]: https://gitlab.com/pgjones/quart
104 [aiohttp]: https://github.com/aio-libs/aiohttp
105 [tornado]: https://github.com/tornadoweb/tornado
106 [fastapi]: https://github.com/tiangolo/fastapi