Skip to content

pytibero

Unofficial Python DB-API 2.0 connector for Tibero.

What pytibero provides

pytibero exposes a DB-API 2.0-compliant interface while supporting two runtime backends: pyodbc (default) and native tbcli.

Portable application code

Write against pytibero exception classes and DB-API patterns so your code remains backend-agnostic.

Key features

  • Python DB-API 2.0 compatible interface for Tibero
  • Direct host/port and DSN-based connection options
  • Optional tbcli backend for native Tibero client usage
  • Familiar cursor and transaction workflow via a Pythonic API

Feature overview

mermaid flowchart LR A[Application code] --> B[pytibero.connect] B --> C{Backend} C -->|pyodbc| D[ODBC driver path] C -->|tbcli| E[Native tbcli path] D --> F[Connection and Cursor API] E --> F F --> G[DB-API exceptions and type helpers]

Quick install

pip install pytibero

Connect in seconds

import pytibero

with pytibero.connect(
    host="localhost",
    port=8629,
    database="test",
    user="tibero",
    password="tmax",
) as conn:
    cursor = conn.cursor()
    cursor.execute("SELECT 1 FROM dual")
    print(cursor.fetchall())

Documentation