Skip to main content

Relaxed PostgreSQL dialects for SQLAlchemy

Project description

https://github.com/pyveci/sqlalchemy-postgresql-relaxed/workflows/Tests/badge.svg Test suite code coverage https://pepy.tech/badge/sqlalchemy-postgresql-relaxed/month https://img.shields.io/pypi/v/sqlalchemy-postgresql-relaxed.svg https://img.shields.io/pypi/status/sqlalchemy-postgresql-relaxed.svg https://img.shields.io/pypi/pyversions/sqlalchemy-postgresql-relaxed.svg https://img.shields.io/pypi/l/sqlalchemy-postgresql-relaxed.svg

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/pyveci/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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sqlalchemy-postgresql-relaxed-0.1.1.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file sqlalchemy-postgresql-relaxed-0.1.1.tar.gz.

File metadata

File hashes

Hashes for sqlalchemy-postgresql-relaxed-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e553c022fcddada45b433373544e0ca658fae7d8efcbda7b3763281143b31a51
MD5 ecd90062448fb426e4accf9edc0bd6d2
BLAKE2b-256 f2f8a6a47a72bf900ee7c932dbfb550b56008511e3ac7659a6dc890d4a904c10

See more details on using hashes here.

File details

Details for the file sqlalchemy_postgresql_relaxed-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sqlalchemy_postgresql_relaxed-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9dcc15dbfe67d36e1924934a012ad1ca6025a5e861e1eab3316c78ad1ee6a2ff
MD5 2294e2956db559c7d7b93f1524ef799a
BLAKE2b-256 2e8e80439fa7fd6b1d743d09b132cfde8e7cd26f1540e52bec39b04d3871e0d3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page