An asynchronous Postgres client and mixin for Tornado applications
Project description
An set of mixins and classes for interacting with PostgreSQL using asyncio in Tornado / sprockets.http applications using aiopg.
Installation
sprockets-postgres is available on the Python package index and is installable via pip:
pip install sprockets-postgres
Documentation
Documentation is available at sprockets-postgres.readthedocs.io.
Configuration
The following table details the environment variable configuration options:
Variable |
Definition |
Default |
---|---|---|
POSTGRES_URL |
The PostgreSQL URL to connect to |
|
POSTGRES_MAX_POOL_SIZE |
Maximum connection count to Postgres per backend |
0 (Unlimited) |
POSTGRES_MIN_POOL_SIZE |
Minimum or starting pool size. |
1 |
POSTGRES_CONNECTION_TIMEOUT |
The maximum time in seconds to spend attempting to create a new connection. |
10 |
POSTGRES_CONNECTION_TTL |
Time-to-life in seconds for a pooled connection. |
300 |
POSTGRES_QUERY_TIMEOUT |
Maximum execution time for a query in seconds. |
60 |
POSTGRES_HSTORE |
Enable HSTORE support in the client. |
FALSE |
POSTGRES_JSON |
Enable JSON support in the client. |
FALSE |
POSTGRES_UUID |
Enable UUID support in the client. |
TRUE |
Requirements
Version History
Available at https://sprockets-postgres.readthedocs.org/en/latest/history.html
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.