Relaxed PostgreSQL dialects for SQLAlchemy
Project description
Relaxed PostgreSQL dialects for SQLAlchemy
About
The vanilla dialects for connecting to PostgreSQL with SQLAlchemy will employ a few behaviors that strictly expect a PostgreSQL server on the other end. However, some operations may croak on databases which only offer wire-compatibility with PostgreSQL.
The dialects provided by sqlalchemy-postgresql-relaxed are building upon the vanilla SQLAlchemy dialects, but will disable a few PostgreSQL specifics.
postgresql+psycopg: Accept non-conforming server version responses.
postgresql+psycopg: Don’t issue SHOW STANDARD_CONFORMING_STRINGS inquiry.
postgresql+asyncpg: Don’t strictly expect JSON and JSONB codecs.
Usage
The corresponding dialect identifiers are:
postgresql+psycopg_relaxed
postgresql+asyncpg_relaxed
They can be used within SQLAlchemy database URL identifiers as usual.
# psycopg synchronous
create_engine(
url="postgresql+psycopg_relaxed://crate@localhost/acme",
isolation_level="AUTOCOMMIT",
use_native_hstore=False)
# psycopg asynchronous
create_async_engine(
url="postgresql+psycopg_relaxed://crate@localhost/acme",
isolation_level="AUTOCOMMIT",
use_native_hstore=False)
# asyncpg
create_async_engine(
url="postgresql+asyncpg_relaxed://crate@localhost/acme",
isolation_level="AUTOCOMMIT")
Setup
pip install --upgrade sqlalchemy-postgresql-relaxed
To install the latest development version from the repository, invoke:
pip install --upgrade git+https://github.com/daq-tools/sqlalchemy-postgresql-relaxed
Project information
Contributions
Every kind of contribution, feedback, or patch, is much welcome. Create an issue or submit a patch if you think we should include a new feature, or to report or fix a bug.
Development
In order to setup a development environment on your workstation, please head over to the development sandbox documentation. When you see the software tests succeed, you should be ready to start hacking.
Resources
License and warranty
The project is licensed under the terms of the MIT license, see LICENSE.
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.
Source Distribution
Built Distribution
Hashes for sqlalchemy-postgresql-relaxed-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06f160493f752bfd1a00e073e570df1d47da15989b3194c7d4966b7f7df4a8e8 |
|
MD5 | 9100c02ea45f204573b27f6b20311572 |
|
BLAKE2b-256 | 3eb0d549181edd2da383d7455d07d7dee91cc6b1bf9126c89e072a71aa7d02b9 |
Hashes for sqlalchemy_postgresql_relaxed-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c095ee6443976cb101c04dbee2b97880eeea5eea90d12f026028a54adcb7d525 |
|
MD5 | ca98eee05c5a33722f6cfb824a4aa767 |
|
BLAKE2b-256 | 26952719d4b6e18942e0a388184dc4481f419be196ba7af772f0a1dbe015d3e0 |