Skip to content

sqlalchemy-cubrid

SQLAlchemy 2.0–2.1 dialect for CUBRID, built for production-ready Core and ORM workloads.

Key features

  • Native SQLAlchemy 2.0–2.1 dialect support with statement caching
  • CUBRID-specific DML support including ON DUPLICATE KEY UPDATE, MERGE, and REPLACE INTO
  • Complete type system coverage and schema reflection support
  • Built-in Alembic migration integration for CUBRID
  • Dual driver support: C-extension (cubrid://) and pure Python (cubrid+pycubrid://)

Quick install

pip install sqlalchemy-cubrid

Pure Python driver option:

pip install "sqlalchemy-cubrid[pycubrid]"

Minimal example

from sqlalchemy import create_engine, text
engine = create_engine("cubrid://dba:password@localhost:33000/demodb")
with engine.connect() as conn:
    result = conn.execute(text("SELECT 1"))
    row = result.fetchone()
    print(row[0])

Documentation sections

Ecosystem

Part of the cubrid-lab Python ecosystem:

  • pycubrid — Pure-Python DB-API 2.0 driver for CUBRID (sync + native asyncio)
  • sqlalchemy-cubrid — SQLAlchemy 2.0–2.2 dialect + Alembic
  • cubrid-cookbook-python — 68 runnable examples and application templates
  • cubrid-mcp-server — MCP server — natural-language access for LLM clients