sqlalchemy tutorialSQLAlchemy SQLAlchemy i About the Tutorial SQLAlchemy is a popular SQL toolkit and Object Relational Mapper. It is written in Python and gives full power application developer. It is an open source and cross-platform software released under MIT license. SQLAlchemy is famous for its object-relational mapper (ORM), using which classes can be mapped to the database designed for all those Python programmers who would like to understand the ORM framework with SQLAlchemy and its API. Prerequisites Before you start proceeding with this tutorial, we assume you have0 码力 | 92 页 | 1.77 MB | 1 年前3
Flask入门教程SQLite,它基于文件,不需要单独启动数据库服务器,适合在开发 时使用,或是在数据库操作简单、访问量低的程序中使用。 使用 SQLAlchemy 操作数据库 为了简化数据库操作,我们将使用 SQLAlchemy——一个 Python 数据库工具 (ORM,即对象关系映射)。借助 SQLAlchemy,你可以通过定义 Python 类来表 示数据库里的一张表(类属性表示表中的字段 / 列),通过对这个类进行各种操作 将使用一个叫做 Flask-SQLAlchemy 的官方扩展来集成 SQLAlchemy。 首先使用 Pipenv 安装它: $ pipenv install flask-sqlalchemy 大部分扩展都需要执行一个“初始化”操作。你需要导入扩展类,实例化并传入 Flask 程序实例: from flask_sqlalchemy import SQLAlchemy # 导入扩展类 app app = Flask(__name__) db = SQLAlchemy(app) # 初始化扩展,传入程序实例 app 设置数据库 URI 第 5 章:数据库 35 为了设置 Flask、扩展或是我们程序本身的一些行为,我们需要设置和定义一些配 置变量。Flask 提供了一个统一的接口来写入和获取这些配置变 量: Flask.config 字典。配置变量的名称必须使用大写,写入配置的语句一般0 码力 | 127 页 | 7.62 MB | 1 年前3
Flask Documentation (1.1.x)to offer. You can implement advanced patterns in 3 Flask Documentation (1.1.x), Release 1.1.4 SQLAlchemy or another database tool, introduce non-relational data persistence as appropriate, and take advantage Extensions Extensions are packages that help you accomplish common tasks. For example, Flask-SQLAlchemy provides SQLAlchemy support that makes it simple and easy to use with Flask. For more on Flask extensions separately, instead of configuring only the root logger. for logger in ( app.logger, logging.getLogger('sqlalchemy'), logging.getLogger('other_package'), ): logger.addHandler(default_handler) logger.addHandler(mail_handler)0 码力 | 291 页 | 1.25 MB | 1 年前3
Celery 2.5 Documentationis RabbitMQ, but support for Redis, MongoDB, Beanstalk, Amazon SQS, CouchDB and databases (using SQLAlchemy or the Django ORM) is also available. Celery is easy to integrate with web frameworks, some of Redis backend settings 1.2.3 Using SQLAlchemy Installation Configuration Celery needs to know the location of your database, which should be the usual SQLAlchemy connection string, but with ‘sqla+’ which have to be an SQLAlchemy database URI. Please see SQLAlchemy: Supported Databases for a table of supported databases. Here’s a list of examples using a selection of other SQLAlchemy Connection String‘s:0 码力 | 400 页 | 1.40 MB | 1 年前3
Celery 3.1 Documentationmore. It supports • Brokers • RabbitMQ, Redis, • MongoDB (exp), ZeroMQ (exp) • CouchDB (exp), SQLAlchemy (exp) • Django ORM (exp), Amazon SQS, (exp) • and more... • Concurrency • prefork (multiprocessing) Release 3.1.25 • threads/single threaded • Result Stores • AMQP, Redis • memcached, MongoDB • SQLAlchemy, Django ORM • Apache Cassandra • Serialization • pickle, json, yaml, msgpack. • zlib, bzip2 compression transport. celery[zeromq] for using ZeroMQ as a message transport (experimental). celery[sqlalchemy] for using SQLAlchemy as a message transport (experimental), or as a result backend (supported). celery[pyro]0 码力 | 607 页 | 2.27 MB | 1 年前3
Celery 2.4 Documentationbroker is RabbitMQ, but limited support for Redis, Beanstalk, MongoDB, CouchDB and databases (using SQLAlchemy or the Django ORM) is also available. Celery is easy to integrate with Django, Pylons and Flask backend settings 1.2.3 Using SQLAlchemy Installation For the SQLAlchemy transport you have to install the kombu-sqlalchemy library: $ pip install -U kombu-sqlalchemy Configuration This transport to be an SQLAlchemy database URI. 1. Set your broker transport: BROKER_TRANSPORT = "sqlalchemy" 2. Configure the database URI: BROKER_HOST = "sqlite:///celerydb.sqlite" Please see SQLAlchemy: Supported0 码力 | 395 页 | 1.54 MB | 1 年前3
Celery 2.3 Documentationbroker is RabbitMQ, but limited support for Redis, Beanstalk, MongoDB, CouchDB and databases (using SQLAlchemy or the Django ORM) is also available. Celery is easy to integrate with Django, Pylons and Flask needs to store or send the states somewhere. There are several built-in backends to choose from: SQLAlchemy/Django ORM, Memcached, Redis, AMQP, MongoDB, Tokyo Tyrant and Redis – or you can define your own needs to store or send the states somewhere. There are several built-in backends to choose from: SQLAlchemy/Django ORM, Memcached, Redis, AMQP, MongoDB, Tokyo Tyrant and Redis – or you can define your own0 码力 | 334 页 | 1.25 MB | 1 年前3
Celery 2.2 Documentationbroker is RabbitMQ, but limited support for Redis, Beanstalk, MongoDB, CouchDB and databases (using SQLAlchemy or the Django ORM) is also available. Celery is easy to integrate with Django, Pylons and Flask needs to store or send the states somewhere. There are several built-in backends to choose from: SQLAlchemy/Django ORM, Memcached, Redis, AMQP, MongoDB, Tokyo Tyrant and Redis – or you can define your own (tombstones). Can be one of the following: • database (default) Use a relational database supported by SQLAlchemy. See Database backend settings. • cache Use memcached to store the results. See Cache backend0 码力 | 314 页 | 1.26 MB | 1 年前3
Celery 3.0 DocumentationStores • AMQP, Redis 2.2. Getting Started 7 Celery Documentation, Release 4.0.0 • Memcached, • SQLAlchemy, Django ORM • Apache Cassandra, Elasticsearch • Serialization • pickle, json, yaml, msgpack. • result backend. celery[zookeeper] for using Zookeeper as a message transport. celery[sqlalchemy] for using SQLAlchemy as a result backend (supported). celery[pyro] for using the Pyro4 message transport store or send the states somewhere. There are several built-in result backends to choose from: SQLAlchemy/Django ORM, Memcached, Redis, RPC (RabbitMQ/AMQP), and – or you can define your own. 2.2. Getting0 码力 | 703 页 | 2.60 MB | 1 年前3
Celery v4.0.0 DocumentationStores • AMQP, Redis 2.2. Getting Started 7 Celery Documentation, Release 4.0.0 • Memcached, • SQLAlchemy, Django ORM • Apache Cassandra, Elasticsearch • Serialization • pickle, json, yaml, msgpack. • result backend. celery[zookeeper] for using Zookeeper as a message transport. celery[sqlalchemy] for using SQLAlchemy as a result backend (supported). celery[pyro] for using the Pyro4 message transport store or send the states somewhere. There are several built-in result backends to choose from: SQLAlchemy/Django ORM, Memcached, Redis, RPC (RabbitMQ/AMQP), and – or you can define your own. 2.2. Getting0 码力 | 701 页 | 2.59 MB | 1 年前3
共 137 条
- 1
- 2
- 3
- 4
- 5
- 6
- 14













