sqlalchemy-cockroachdb
CockroachDB dialect for SQLAlchemy
Decision gist · record as of 2026-08-14
Yes, if you are using SQLAlchemy 2.0.x and need CockroachDB support. The package is actively maintained, has no known vulnerabilities, carries a permissive license, and requires only one runtime dependency. The main condition is that you must install a separate database driver (psycopg2, asyncpg, or psycopg) before you can connect—this is documented but represents a real prerequisite step.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires SQLAlchemy 2.0.x and one of: psycopg2, psycopg2-binary, asyncpg, or psycopg (version 3).
- Without a driver installed, connection attempts will fail.
- Low friction install with a single runtime dependency on SQLAlchemy.
License · maintenance · safety
permissive license (permissive) — Licensed under Apache 2.0 (permissive), allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
last release 2026-04-23 (113 days) · last repo commit 2026-08-05 · 156 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 970,968 downloads/mo, #4,609 on PyPI
Alternatives
Verify before relying
pip install sqlalchemy-cockroachdb
from sqlalchemy import create_engine
engine = create_engine('cockroachdb://root@localhost:26257/defaultdb?sslmode=disable')- Whether the dialect supports all CockroachDB-specific SQL features and extensions beyond standard PostgreSQL compatibility.
- Performance characteristics and any known limitations when used with high-concurrency async workloads.
- Compatibility matrix details between specific CockroachDB versions and this dialect version.
What it is and what it does
This package provides a SQLAlchemy dialect that translates SQLAlchemy's ORM and Core SQL constructs into CockroachDB-compatible SQL. It acts as a bridge between your Python application and a CockroachDB cluster, allowing you to use SQLAlchemy's familiar API instead of writing raw SQL or using a lower-level driver directly.
The dialect supports three different database drivers—psycopg2 (and its binary variant), asyncpg, and psycopg (version 3)—giving you flexibility in choosing between synchronous and asynchronous operation. You specify which driver to use in your connection string (e.g., `cockroachdb+asyncpg://...`). The package itself is a thin adapter layer; it depends only on SQLAlchemy and requires you to install your chosen driver separately.
Use it for
- Building a Python web application with SQLAlchemy ORM models that persists data to a CockroachDB cluster.
- Migrating an existing SQLAlchemy application from PostgreSQL to CockroachDB with minimal code changes.
- Writing async Python services that need non-blocking database access to CockroachDB via asyncpg.
- Using SQLAlchemy's query builder and schema reflection tools against CockroachDB without raw SQL.
- Testing distributed SQL workloads locally by connecting a SQLAlchemy app to a local CockroachDB node.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are using SQLAlchemy 2.0.x and need CockroachDB support.
The package is actively maintained, has no known vulnerabilities, carries a permissive license, and requires only one runtime dependency. The main condition is that you must install a separate database driver (psycopg2, asyncpg, or psycopg) before you can connect—this is documented but represents a real prerequisite step.
Install
sqlalchemy-cockroachdb on PyPI
Before you install
Low friction install with a single runtime dependency on SQLAlchemy. The package is actively maintained with a recent release and no known vulnerabilities. However, you must separately install one of three database drivers (psycopg2, asyncpg, or psycopg) before the dialect will function.
Requires SQLAlchemy 2.0.x and one of: psycopg2, psycopg2-binary, asyncpg, or psycopg (version 3). Without a driver installed, connection attempts will fail.
License in practice
Licensed under Apache 2.0 (permissive), allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install sqlalchemy-cockroachdb
from sqlalchemy import create_engine
engine = create_engine('cockroachdb://root@localhost:26257/defaultdb?sslmode=disable')
Verify before relying
- Whether the dialect supports all CockroachDB-specific SQL features and extensions beyond standard PostgreSQL compatibility.
- Performance characteristics and any known limitations when used with high-concurrency async workloads.
- Compatibility matrix details between specific CockroachDB versions and this dialect version.
Package facts
| License | permissive license permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageSQLAlchemy |
| Maintenance | Actively maintained 113 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 970,968 / month, #4,609 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: sqlalchemy_cockroachdb-2.0.4-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “sqlalchemy cockroachdb dialect”
- sqlalchemy-cockroachdbA SQLAlchemy dialect that enables ORM and SQL toolkit access to…
- sqlalchemy-pgspiderProvides a SQLAlchemy dialect that enables connections to PGSpider…
- sqlalchemy-databricksProvides a SQLAlchemy dialect that connects to Databricks workspaces…
Give your agent the search over MCP, or paste the wish link into any chat.
More Front-Ends packages
SQLAlchemy is a Python SQL toolkit and Object Relational Mapper (ORM) that provides both a high-level ORM layer for declarative object persistence and a Core SQL construction system for direct database abstraction and query building.
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Alembic generates and manages database schema migrations for SQLAlchemy applications, handling version control of database structure changes with support for upgrades, downgrades, and auto-generation from model changes.
Install it if you use SQLAlchemy and need to version-control schema changes; skip it only if you manage migrations manually or use a different ORM entirely.
A Python client library for connecting to and querying Weaviate, a vector database that enables semantic search and AI-powered data retrieval.
A Python client library that connects to Databricks clusters and SQL warehouses using a Thrift-based protocol, conforming to the Python DB API 2.0 specification and supporting Arrow-based data exchange.
Install it if you need to query Databricks clusters or SQL warehouses from Python.
Psycopg 3 is a PostgreSQL database adapter for Python that enables applications to connect to, query, and manage PostgreSQL databases using Python code.
Install it if you need to connect Python to PostgreSQL.
See also pinotdb · sqlalchemy-jdbcapi · sqlalchemy-risingwave · sqlalchemy-pgspider · starrocks · prisma · clickhouse-sqlalchemy · sqlalchemy-rdsiam · chalk-sqlalchemy-redshift · sqlalchemy-redshift