CockroachDB dialect for SQLAlchemy
Project description
CockroachDB dialect for SQLAlchemy
Prerequisites
For psycopg2 support you must install either:
-
psycopg2, which has some prerequisites of its own.
(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 (⚠️ experimental 🏗):
from sqlalchemy import create_async_engine
engine = create_async_engine('cockroachdb+asyncpg://root@localhost:26257/defaultdb')
Changelog
See CHANGES.md
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
Close
Hashes for sqlalchemy-cockroachdb-1.4.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d31bfa5e5dc964177598431c3d6a85f670d87462bce3c02f06439bb73d8804a7 |
|
MD5 | 68e96a94fa311efc015ad0859520ee98 |
|
BLAKE2b-256 | 2514bd16f0680d9ce78bf729a739df7257a576a98804c339fe0c449d58ede402 |
Close
Hashes for sqlalchemy_cockroachdb-1.4.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84b23f452efba000e16c9157282ca6fb132dd04de9cda715902a4583a59461c7 |
|
MD5 | f384486a95598d232dd24cc30bc572ec |
|
BLAKE2b-256 | e9375c645bb12331a2343a79ee658d289bb4bc68fdea7931eb6f3987222c3df4 |