Skip to main content

CockroachDB dialect for SQLAlchemy

Project description

CockroachDB dialect for SQLAlchemy

Prerequisites

For psycopg2 support you must install either:

(The binary package is a practical choice for development and testing but in production it is advised to use the package built from sources.)

Or, for asyncpg support (experimental) you must install

Install and usage

Use pip to install the latest version.

pip install sqlalchemy-cockroachdb

Use a cockroachdb connection string when creating the Engine. For example, to connect to an insecure, local CockroachDB cluster using psycopg2:

from sqlalchemy import create_engine
engine = create_engine('cockroachdb://root@localhost:26257/defaultdb?sslmode=disable')

or

from sqlalchemy import create_engine
engine = create_engine('cockroachdb+psycopg2://root@localhost:26257/defaultdb?sslmode=disable')

To connect using asyncpg:

from sqlalchemy import create_async_engine
engine = create_async_engine('cockroachdb+asyncpg://root@localhost:26257/defaultdb')

Changelog

See CHANGES.md

Project details


Download files

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

Source Distribution

sqlalchemy-cockroachdb-1.4.3.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

sqlalchemy_cockroachdb-1.4.3-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

Details for the file sqlalchemy-cockroachdb-1.4.3.tar.gz.

File metadata

  • Download URL: sqlalchemy-cockroachdb-1.4.3.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.7

File hashes

Hashes for sqlalchemy-cockroachdb-1.4.3.tar.gz
Algorithm Hash digest
SHA256 0c0158272ac3eefa69932b56d7cc52c1bb24a9a3c8fb7de08b8ea78482fefeab
MD5 b72a11438cf7ba4a1b71117b46cbb256
BLAKE2b-256 ebb4d53d393739d9c4e93cbdc35589ba10b581ce10f1de397dab293a02547ced

See more details on using hashes here.

File details

Details for the file sqlalchemy_cockroachdb-1.4.3-py3-none-any.whl.

File metadata

  • Download URL: sqlalchemy_cockroachdb-1.4.3-py3-none-any.whl
  • Upload date:
  • Size: 31.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.7

File hashes

Hashes for sqlalchemy_cockroachdb-1.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6577bed32912919e912b3a32da0502439ed4daa3e45d4572b7089ebb1b029992
MD5 01ad372e2d45062fd1db40e9bfff5263
BLAKE2b-256 d28bdbf2d90cc46121345897277ec69f8f7bca2d4cc75e599823e684893e4ea5

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