100+ results for 'sqlalchemy tornado'

Not the results you expected?

Alerts.py (https://gitlab.com/fdemian/Shelob) Python · 160 lines

3 from api.authentication.AuthenticatedHandler import AuthenticatedHandler

4 from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound

5 from tornado.gen import coroutine

Story.py (https://gitlab.com/fdemian/Shelob) Python · 113 lines

1 import json

2 from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound

3 from api.model.models import Story

4 from api.authentication.AuthenticatedHandler import AuthenticatedHandler

5 from tornado.gen import coroutine

6

env.py (https://gitlab.com/fdemian/Shelob) Python · 86 lines

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

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

3 from api.model.models import Story, Comment, Notification, User

4 from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound

5 from api.authentication.AuthenticatedHandler import AuthenticatedHandler

6 from tornado.gen import coroutine

7 import 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...)

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:

5

GlobalOptions.py (https://gitlab.com/fdemian/Shelob) Python · 118 lines

1 import json

2 from tornado.web import RequestHandler

3 from tornado.gen import coroutine

4 from api.model.models import GlobalConfiguration

5 # from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound

6

__init__.py (https://github.com/thecowboy/apollo.git) Python · 103 lines

30

31 from sqlalchemy.engine import create_engine

32

34

35 from tornado.options import define, options, parse_config_file, parse_command_line

36 from 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

17 from tornado.web import HTTPError

18 from sqlalchemy.orm import undefer

README.rst (https://gitlab.com/carmes/aiomysql) ReStructuredText · 146 lines

20 to async, basically ``yield from`` and ``asyncio.coroutine`` added in

21 proper places)). `sqlalchemy` support ported from aiopg_.

22

96

97 Example of SQLAlchemy optional integration

98 ------------------------------------------

99 Sqlalchemy support has been ported from aiopg_ so api should be very familiar

100 for 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

install.sh (https://github.com/mkb218/wub-machine.git) Shell · 133 lines

46

47 # Install server-specific stuff: SQLAlchemy, Tornadio, Tornadio from HEADs

48 apt-get install python-mysqldb

49 pip install sqlalchemy

50

51 git clone https://github.com/facebook/tornado.git

52 cd tornado

54 cd ..

55 rm -rf tornado/

56

88

89 # Install server-specific stuff: SQLAlchemy, Tornadio, Tornadio from HEADs

90 pip install python-mysqldb

Activation.py (https://gitlab.com/fdemian/Shelob) Python · 118 lines

2 from api.model.models import User, UserActivation

3 from tornado.web import RequestHandler

4 from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound

5 from 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

OAuthService.py (https://gitlab.com/fdemian/Shelob) Python · 91 lines

1 from tornado import gen

2 from .FacebookService import FacebookAuthService

4 from api.authentication.AuthExceptions import OAuthFailedException, NoSuchServiceException

5 from sqlalchemy.orm.exc import MultipleResultsFound

6 from api.model.sessionHelper import get_session

TwitterService.py (https://gitlab.com/fdemian/Shelob) Python · 53 lines

1 import tornado

2 import tornado.web

3 import tornado.auth

4 from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound

8

9 class TwitterService(tornado.web.RequestHandler, tornado.auth.TwitterMixin):

10

11 @tornado.gen.coroutine

12 def get(self, auth_code, redirect_url):

FacebookService.py (https://gitlab.com/fdemian/Shelob) Python · 103 lines

1 from tornado.auth import FacebookGraphMixin

2 from tornado.gen import coroutine

3 from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound

4 from 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

21 RUN \

38 pip install -r requirements.txt && \

39 pip install 'tornado>=4.0' jsonschema

40

setup.py (https://gitlab.com/e0/luigi) Python · 90 lines

39 install_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

1 import tornado

2 import tornado.web

3 from tornado.auth import GoogleOAuth2Mixin

4 from tornado.web import RequestHandler

5 from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound

6 from api.model.sessionHelper import get_session

app_frontend_base.pp (https://gitlab.com/karambir/zulip) Puppet · 136 lines

17 "python-mock",

18 # Tornado dependencies

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

111 }

112 file { "/home/zulip/tornado":

113 ensure => directory,

base.py (https://gitlab.com/forevercat/Project) Python · 75 lines

5

6 import tornado.web

7 from tornado import httputil

8

9 import sqlalchemy

10 from sqlalchemy import create_engine

11 from sqlalchemy.orm import sessionmaker

12 from sqlalchemy import func

21

22 class BaseHandler(tornado.web.RequestHandler):

23 __model__ = '__base__'

Drafts.py (https://gitlab.com/fdemian/Shelob) Python · 281 lines

2 from api.model.models import Story, User, Category

3 from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound

4 from api.authentication.AuthenticatedHandler import AuthenticatedHandler

5 from tornado.gen import coroutine

6 from api.Utils import authenticated

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

166 Tornado web app

167 ---------------

__init__.py (https://gitlab.com/Xylol/weiqi.gs) Python · 42 lines

18

19 from sqlalchemy.orm import scoped_session

20 from weiqi import settings

34 # in factory boy.

35 # This is mainly used to test tornado request handlers.

36 from contextlib import contextmanager

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"

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

index.py (https://gitlab.com/duonggit/weiqi.gs) Python · 82 lines

16

17 from sqlalchemy.orm import undefer

18 from tornado.web import HTTPError

create_database.py (https://gitlab.com/fdemian/Shelob) Python · 38 lines

1 from sqlalchemy import create_engine

2 from tornado.options import define, options, parse_config_file

sessionHelper.py (https://gitlab.com/fdemian/Shelob) Python · 35 lines

1 from sqlalchemy import create_engine

2 from sqlalchemy.orm import sessionmaker

3 from tornado.options import options, parse_config_file

4 from os import path

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

12

13 # Tornado / zmq imports

14 import zmq

15 from zmq.eventloop import ioloop

16 import tornado.web

17

23

24 # Tornado Web Server

25 import handlers

26

27 class 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

22 to async, basically ``yield from`` and ``asyncio.coroutine`` added in

23 proper 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

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

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

7 from api.model.models import User

8 from tornado.httpclient import AsyncHTTPClient

9 from 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

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

15

16 class ESApplication(tornado.web.Application):

17 def __init__(self, api_entry, **settings):

56 application.listen(port)

57 tornado.ioloop.IOLoop.instance().start()

58

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

3 from sqlalchemy.orm import relationship, backref

4 from sqlalchemy.schema import UniqueConstraint

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

14

15 class TornadoStorage(BaseSQLAlchemyStorage):

16 user = 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

6 from api.model.models import User

7 from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound

8

NoticiaViews.py (https://hg.codeplex.com/hackathon) Python · 97 lines

17 from ..models import DBSession

18 from sqlalchemy import desc

19 from ..ws import notify

Categories.py (https://gitlab.com/fdemian/Shelob) Python · 201 lines

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

README.md (https://gitlab.com/lcp0578/FrameworkBenchmarks.git) Markdown · 126 lines

70

71 ### Gunicorn + Tornado

72

74 Meinheld doesn't so fast with PyPy because it uses Python/C API heavily.

75 So we use Tornado as HTTP/WSGI server.

76

93

94 If 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

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

26 And any form of RDBMS SQLAlchemy supports (PostgreSQL, MySQL, etc.).

27

activity.py (https://github.com/bcampbell/unsourced.git) Python · 62 lines

6

7 import tornado.auth

8 from sqlalchemy import Date,not_

9 from sqlalchemy.sql.expression import cast,func

10 from sqlalchemy.orm import subqueryload,joinedload

run_server.py (https://gitlab.com/lotaku/tornado_jinja.git) Python · 69 lines

7 import motor

8 import tornado

9 from tornado.options import options

30 #todo ?

31 reset_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()

UsuarioViews.py (https://hg.codeplex.com/hackathon) Python · 116 lines

77 import transaction

78 from sqlalchemy.orm import undefer

79 from pyramid.httpexceptions import HTTPFound

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 ]

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'

53 echo 'python-sqlalchemy'

54 wget http://downloads.sourceforge.net/project/sqlalchemy/sqlalchemy/0.6.5/SQLAlchemy-0.6.5.tar.gz

55 popd

56

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

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

3 import tornado.auth

4 import tornado.httpserver

5 import tornado.ioloop

6 import tornado.options

7 import tornado.web

8 import tornado.escape

9 from tornado.options import define, options

14 import demisauce

15 tornado.options.parse_command_line() # must force load of options for metaclass

16 from 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

12 import traceback

13 import tornado

14

15

16 from sqlalchemy.sql import and_

17 from sqlalchemy.orm.exc import NoResultFound

README.rst (https://github.com/marcelnicolay/torneira.git) ReStructuredText · 69 lines

3

4 Torneira is a lightweight web framework build on top of Tornado_. It's name

5 came 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/

69 .. _Tornado: http://www.tornadoweb.org/

70

ubuntu_first_install.sh (https://bitbucket.org/daherssein/linuxtools) Shell · 71 lines

39 sudo pip install pyzmq

40 sudo pip install tornado

41 sudo pip install ipython

57

58 sudo pip install sqlalchemy

59 sudo pip install flask

SuperManagerModel.py (https://gitlab.com/CloudPrintTech/CloudPrintBackend) Python · 195 lines

4 from Model.BaseModel import BaseModel

5 from sqlalchemy.sql.expression import and_

6 import hashlib

8 from Model.ORM import *

9 import 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:

setup.py (https://bitbucket.org/bendikro/deluge-yarss-plugin.git) Python · 86 lines

10

11 # Get the version (borrowed from SQLAlchemy)

12 with open(os.path.join(base_path, "src", "urllib3", "__init__.py")) as fp:

71 "mock",

72 "tornado",

73 ],

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

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 .

setup.py (https://gitlab.com/18runt88/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',

login.py (https://github.com/marcelnicolay/twitter-face-rank.git) Python · 60 lines

6 from torneira.core.meta import TorneiraSession

7 from sqlalchemy.orm.exc import NoResultFound

8 from tornado.web import HTTPError

kali-python.sh (https://github.com/0x0mar/kali-scripts.git) Shell · 108 lines

11 pip install shodan mysql-python python-ntlm scipy selenium tornado netaddr matplotlib paramiko lxml pcapy \

12 GitPython PyGithub SOAPpy SQLAlchemy Jinja2 readline nose six pyparsing==1.5.7 python-dateutil tornado==3.1.1 \

13 pyzmq pytz pika pygments scipy patsy

README.rst (https://github.com/pixlie/tornado-generic-handlers.git) ReStructuredText · 96 lines

4

5 Django's CBVs adapted to be used with Tornado along with SQLAlchemy and WTForms.

6 It's highly recomended to read the docs here first: https://github.com/BeardyBear/tornado-generic-handlers

12

13 The only requirement is SQLAlchemy's session stored in application's db attribute.

14

16

17 from sqlalchemy.orm import scoped_session, sessionmaker

18

19 class Application(tornado.web.Application):

20 def __init__(self):

71

72 class BlogHandler(tornado.web.RequestHandler):

73 @property

__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

21

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")

README.md (https://github.com/nuance/roaring-tofu.git) Markdown · 33 lines

3

4 Source 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

40 * SqlAlchemy_ >= 0.5.6

41 * nose_ >= 0.11.0

60

61 .. _Tornado: http://www.tornadoweb.org/

62 .. _Mako: http://www.makotemplates.org/

63 .. _SqlAlchemy: http://www.sqlalchemy.org/

64 .. _nose: http://code.google.com/p/python-nose/

requirements.sh (https://github.com/Haizhi/docker-brew-datacanvas-base.git) Shell · 110 lines

100 pip3 install six==1.4.1

101 pip3 install SQLAlchemy==0.8.3

102 pip3 install storm==0.20

103 pip3 install tables==3.0.0

104 pip3 install tornado==3.1.1

105 pip3 install traits==4.3.0

db.py (https://gitlab.com/qb1t/mitro) Python · 49 lines

1 from tornado.options import define, options

2

3 from sqlalchemy import create_engine

4 from sqlalchemy.ext.declarative import declarative_base

5 from sqlalchemy.orm import sessionmaker

6 from sqlalchemy.pool import StaticPool

7 from sqlalchemy.pool import NullPool

8

32 def connect_to_database():

33 '''Connects SQLAlchemy to the database. Call this after command-line parsing.'''

34

40 def connect_to_test_database():

41 '''Connects SQLAlchemy to the test database. Call this after command-line

42 parsing.'''

README.rst (https://github.com/araddon/demisauce.git) ReStructuredText · 67 lines

9

10 Powered By `Tornado <http://www.tornadoweb.org>`_, MySql, `Gearman <http://www.gearman.org>`_, `Redis <http://www.tornadoweb.org>`_

11

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())::

models2.py (https://gitlab.com/qb1t/mitro) Python · 48 lines

9 import 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)

28 arg_string = sqlalchemy.Column(sqlalchemy.Text, nullable=False)

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(

about.html (https://github.com/sebdelsol/ComicStreamer.git) HTML · 85 lines

53 <li><a href="https://www.python.org" >Python</a></li>

54 <li><a href="http://www.sqlalchemy.org/" >SQLAlchemy</a></li>

55 <li><a href="http://www.tornadoweb.org" >Tornado</a></li>

crawler.py (https://github.com/xinzhengzhang/ssdut_news_server.git) Python · 155 lines

5 import traceback

6 from sqlalchemy import func

7 import db

9 import config

10 from utils import TornadoFormatter

11 import time

132 console_handler.setLevel(logging.DEBUG)

133 # console_handler.setFormatter(TornadoFormatter(color=True))

134

136 file_handler.setLevel(logging.DEBUG)

137 # file_handler.setFormatter(TornadoFormatter(color=False))

138

README.rst (https://github.com/adamchainz/Dash.py.git) ReStructuredText · 52 lines

11 dash.py install flask

12 dash.py install tornado jinja2 sqlalchemy

13

12-12-is-short-of.rst (https://github.com/akolechkin/tonysu.git) ReStructuredText · 34 lines

31 - Достойного АИ-98 на заправках

32 - Возможности делать асинхронный вызов в tornado так же легко как deferToThread в twisted

33 - Пива "Тогучинсоке" - было раньше такое

ana_env.yml (https://github.com/chichulapiuka/python-fundamentals.git) YAML · 43 lines

11 - python-scipy

12 - python-sqlalchemy

13 - python-sqlite

14 - python-tornado

15 - python-virtualenv

default.nix (https://codeberg.org/matthiasbeyer/nixpkgs.git) Nix · 52 lines

15 , sanic

16 , sqlalchemy

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

20 def 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'

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

version.py (https://github.com/araddon/demisauce.git) Python · 107 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

15 from wtforms.validators import ValidationError

16 from tornado import escape

17 from tornado.options import options

wsgi.py (https://github.com/nuance/roaring-tofu.git) Python · 24 lines

5

6 from tornado.options import logging

7 import wsgiref

8

9 from sqlalchemy import create_engine

10 import tornado.wsgi

17

18 application = tornado.wsgi.WSGIApplication(handlers.app_urls.urls, **config.http_params)

19

main.py (https://bitbucket.org/martijnbb/mbastiaan) Python · 110 lines

40 except ImportError:

41 print("You can define Tornado options in settings.py. Use"\

42 " the variable {APP,LISTEN}_OPTIONS")

49 if __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

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)

16 fp = open(os.path.join(base_path, 'urllib3', '__init__.py'))

53 'mock',

54 'tornado',

55 ],

README.md (https://github.com/mrowl/filmdata.git) Markdown · 31 lines

3

4 Technically 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

6 Sometimes 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

22 Coming 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

mysql-sqlalchemy.rst (https://github.com/SAKev/lepture.com.git) ReStructuredText · 90 lines

1 MySQL and SQLAlchemy in tornado

2 ================================

5 :date: 2012-02-09 21:15

6 :github: lepture/tornado.ext

7 :tags:

9 - mysql

10 - tornado

11

15

16 I just started a new project, which is built on tornado with database of mysql.

17

20

21 I am using SQLAlchemy as the ORM engine, according to the document_ , I added ``pool_recycle=3600`` , but it didn't work. And I don't know why. It seems that many a people has such a problem

22 when I searched Stack Overflow.

26

27 I have written a `wrap for SQLAlchemy <http://lepture.com/work/tornado-ext/>`_ to make it a

28 little Django like. Then I add this feature to it.

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

1 One of the new features in [SQLAlchemy] 0.9 is event removal API. Basically, if

2 you've added an event listener, this change makes you able to remove it.

74 possible. 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

76 anything. (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/

models.py (https://github.com/haftrine/python-social-auth.git) Python · 62 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, \

8 SQLAlchemyNonceMixin, \

9 SQLAlchemyCodeMixin, \

10 BaseSQLAlchemyStorage

11

12

13 class TornadoStorage(BaseSQLAlchemyStorage):

14 user = None

45

46 class Nonce(_AppSession, Base, SQLAlchemyNonceMixin):

47 """One use numbers"""

setup.py (https://github.com/AdamBSteele/suite-front-end.git) Python · 42 lines

18 'Flask',

19 'Flask-SQLAlchemy',

20 'Flask-WTF',

29 'mysql-python',

30 'tornado',

31 'psycopg2'

index.rst (https://github.com/dalibo/powa.git) ReStructuredText · 98 lines

17 * `psycopg2 <http://initd.org/psycopg/>`_

18 * `sqlalchemy <http://sqlalchemy.org>`_

19 * `tornado >= 2.0 <http://tornadoweb.org>`_

25

26 apt-get install python python-psycopg2 python-sqlalchemy python-tornado

27

32

33 pacman -S python python-psycopg2 python-sqlalchemy python-tornado

34

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

5

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'))

28

29 sql = sqlalchemy

30

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

26 from netaddr import IPAddress

27 from sqlalchemy import Column, ForeignKey

28 from sqlalchemy.orm import synonym

29 from sqlalchemy.types import Integer, String

30 from models import dbsession

31 from models.BaseModels import DatabaseObject

32 from tornado import netutil

33

global_settings.py (https://github.com/akun/workin.git) Python · 46 lines

32

33 # sqlalchemy settings

34 SQLALCHEMY_ENGINE_URL = None

35 SQLALCHEMY_ENGINE_KWARGS = {}

36

41

42 # Low level tornado options.

43 TORNADO_TRANSFORMS = None

44 TORNADO_DEFAULT_HOST = ""

45 TORNADO_WSGI_MODE = False

46 TORNADO_SETTINGS = {}

47

standalone.py (https://github.com/nuance/roaring-tofu.git) Python · 30 lines

3

4 from sqlalchemy import create_engine

5 from tornado import web, ioloop, httpserver, options

14

15 log = options.logging.getLogger('app.tornado')

16 app = web.Application(handlers.app_urls.urls, **config.http_params)

web_server_SQL.py (https://github.com/darkness3560/import_private_key_dogecoin_website.git) Python · 84 lines

1 import sqlalchemy as sql

2

3 import tornado.ioloop

4 import tornado.web

5 import tornado

6 import os

9 import uuid

10 from sqlalchemy.orm import sessionmaker

11 from sqlalchemy.ext.declarative import declarative_base

13 Base = declarative_base()

14 from sqlalchemy import Column, String,Float, Boolean

15 class priv_key(Base):

29

30 class MainHandler(tornado.web.RequestHandler):

31 def get(self):

__init__.py (https://github.com/fengluo/july.git) Python · 87 lines

10

11 July is the best season for Tornado , it’s all about how to organize a tornado

12 project. It is inspired by Django and Flask.

23

24 - Organize tornado as App

25 - Built-in SQLAlchemy

emailer2.py (https://gitlab.com/qb1t/mitro) Python · 78 lines

21

22 import sqlalchemy

23 import sqlalchemy.exc

24 import sqlalchemy.ext.declarative

25 import sqlalchemy.orm

26 from sqlalchemy.pool import StaticPool

27 from sqlalchemy.pool import NullPool

28

29 import tornado.options

30

44

45 engine = sqlalchemy.create_engine(url, poolclass=sqlalchemy.pool.NullPool, echo=False)

46 Session.configure(bind=engine)

forms.py (https://github.com/872409/redis-admin.git) Python · 97 lines

5 ~~~~~~~~~~~~~

6 wtforms extensions for tornado

7 """

9

10 from tornado.escape import _unicode

11

28 try:

29 import sqlalchemy

30 _is_sqlalchemy = True

31 except ImportError:

32 _is_sqlalchemy = False

33

34

35 if _is_sqlalchemy:

36 from wtforms.ext.sqlalchemy.fields import QuerySelectField, \

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

config.py (https://github.com/shannonzylstra/sagecell.git) Python · 72 lines

15

16 #db = "sqlalchemy"

17 #db_config = {"uri": "sqlite:///sqlite.db"}

26 permalink_server = {

27 'db': 'sqlalchemy',

28 'db_config': {'uri': 'sqlite:///sqlite.db'}

69 systemlog_handler.setFormatter(logging.Formatter('%(asctime)s %(name)s %(process)d: %(message)r'))

70 logging.getLogger("tornado.application").addHandler(systemlog_handler)

71 logging.getLogger('sagecell.system').addHandler(systemlog_handler)

README.md (https://github.com/sebdelsol/ComicStreamer.git) Markdown · 61 lines

24

25 * tornado

26 * sqlalchemy >= 0.9

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

README.rst (https://github.com/872409/lixian.xunlei.git) ReStructuredText · 88 lines

66 2.6 <= python < 3.0

67 easy_install tornado (>=2.1.1)

68 easy_install requests (>= 0.10.0)

69 easy_install pyparsing

70 easy_install sqlalchemy

71

Makefile (https://github.com/freebsd/freebsd-ports.git) Makefile · 25 lines

14 RUN_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}

app.py (https://github.com/priyaank/python-social-auth.git) Python · 71 lines

4

5 from sqlalchemy import create_engine

6 from sqlalchemy.ext.declarative import declarative_base

7 from sqlalchemy.orm import scoped_session, sessionmaker

8

9 import tornado.httpserver

10 import tornado.ioloop

11 import tornado.options

12 import tornado.web

13

14 from social.apps.tornado_app.models import init_social

15 from social.apps.tornado_app.routes import SOCIAL_AUTH_ROUTES

models.py (https://github.com/yetone/june.git) Python · 126 lines

26 from datetime import datetime

27 from sqlalchemy import Column

28 from sqlalchemy import Integer, String, DateTime, Text

29 from tornado.options import options

30 from july.database import db

python-libs.yaml (https://github.com/chapmanb/cloudbiolinux.git) YAML · 83 lines

70 - scipy

71 - SQLAlchemy

72 - statsmodels

73 - tornado

74

requirements.sh (https://github.com/Haizhi/docker-brew-datacanvas-base.git) Shell · 107 lines

97 pip install six==1.4.1

98 pip install SQLAlchemy==0.8.3

99 pip install storm==0.20

100 pip install tables==3.0.0

101 pip install tornado==3.1.1

102 pip install traits==4.3.0

setting.py (https://github.com/LamCiuLoeng/BookStore.git) Python · 42 lines

16 app_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 }

__init__.py (https://github.com/stan1y/MrHide.git) Python · 50 lines

9

10 import tornado.web

11

15

16 import sqlalchemy.orm.exc

17

21

22 class BaseRequestHandler(tornado.web.RequestHandler):

23

Ciclos.py (https://github.com/sgip/ultimo-repo.git) Python · 115 lines

2 from prueba.model.modelos import Item, Relacion,Fase

3 from sqlalchemy import or_,and_

4

permalink_server.py (https://github.com/sagemath/sagecell.git) Python · 91 lines

3

4 This Tornado server provides a permalink service with a convenient

5 post/get api for storing and retrieving code.

11 import psutil

12 import tornado.httpserver

13 import tornado.ioloop

14 import tornado.web

15

19

20 PERMALINK_DB = "sqlalchemy"

21 PERMALINK_URI = "sqlite:///permalinks.db"

24

25 class PermalinkServer(tornado.web.Application):

26 def __init__(self):

users.py (https://github.com/laoqiu/pypress-tornado.git) Python · 195 lines

11

12 import tornado.web

13

14 from pypress.extensions.sqlalchemy import BaseQuery

15 from pypress.extensions.permission import Permission, RoleNeed, UserNeed

46 if user is None:

47 raise tornado.web.HTTPError(404)

48 return user