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.2.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file sqlalchemy_postgresql_relaxed-0.1.2.tar.gz.

File metadata

File hashes

Hashes for sqlalchemy_postgresql_relaxed-0.1.2.tar.gz
Algorithm Hash digest
SHA256 aae7782e7a0c4a2d9855280aa1c87a71e316b188903615b63f83929c38aa50d5
MD5 52ab17d006f635faf21bbb591de82f11
BLAKE2b-256 742fb42f98d104c59f9db6b3da6ff50fc966df6e81c93134ccf217071e6e2608

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sqlalchemy_postgresql_relaxed-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2ae58a8b0610936579ef13e03d925f2f6147120e553324b854d350ae8eab9f24
MD5 2afb07e18e94b2248ef33c9deddb3d0a
BLAKE2b-256 711e0dfe30e70b57e1954c4e2541f3d7bda7854ebe713397b8c40765d1a61904

See more details on using hashes here.

Supported by

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