Skip to main content

pytibero

CI PyPI version docs

Unofficial Python DB-API 2.0 connector for Tibero

pytibero provides a Pythonic DB-API 2.0 interface for Tibero databases. The current implementation uses pyodbc as the transport backend and wraps Tibero ODBC connectivity behind a clean, package-owned API surface.

This is an independent community project and is not officially supported by TmaxSoft. This project is not affiliated with TmaxSoft.

Why pytibero

  • Python DB-API 2.0 compatible module surface
  • Direct host/port or DSN-based Tibero ODBC connections
  • Optional tbcli backend for Tibero's native client library path (with Decimal precision and chunked large-column reads)
  • Explicit autocommit plus routed pyodbc.connect(...) keyword support
  • Package-owned exception hierarchy and type constructors
  • Safe access to common pyodbc connection metadata such as getinfo(...)
  • Dockerized unit-test workflow with a 95% coverage target
  • Docker-based end-to-end test harness for licensed Tibero environments

Installation

Python package

pip install pytibero

System requirements

  • Python 3.10+
  • pyodbc
  • unixODBC or an equivalent ODBC manager
  • A Tibero ODBC driver installed on the host or in the container

Quick Start

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())

DSN connection

import pytibero

conn = pytibero.connect(dsn="TIBERO_TEST", user="tibero", password="tmax")

Native tbcli backend

import pytibero

conn = pytibero.connect(
    host="localhost",
    port=8629,
    database="test",
    user="tibero",
    password="tmax",
    backend="tbcli",
    tbcli_library="/opt/tibero7/client/lib/libtbcli.so",
)

backend="tbcli" uses Tibero's native CLI library instead of pyodbc. This path is intended for environments where the vendor client library is available locally.

Advanced connection options

import pytibero

conn = pytibero.connect(
    host="localhost",
    user="tibero",
    password="tmax",
    autocommit=True,
    readonly=True,
    ansi=False,
    ApplicationName="pytibero-app",
)

print(conn.getinfo(17))

readonly, ansi, and similar pyodbc.connect(...) options are forwarded as native connect kwargs, while additional values such as ApplicationName stay in the ODBC connection string.

Testing

Unit tests in Docker

make test-docker

This runs the package test suite inside Docker and enforces a 95% coverage threshold.

End-to-end tests in Docker

export TIBERO_LICENSE_FILE=/abs/path/to/license.xml
make test-e2e-docker

The e2e flow expects a licensed Tibero Docker image and a valid license file. See docs/testing.md for the required environment variables.

Documentation

Project Layout

pytibero/
    __init__.py
    connection.py
    cursor.py
    exceptions.py
    types.py
    protocol.py
    config.py
    tbcli.py
tests/
docs/

License

Apache License 2.0. See LICENSE.

Metadata

Release files for pytibero 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytibero 0.2.0
File Size Uploaded
pytibero-0.2.0.tar.gz 25.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytibero 0.2.0
File Interpreter ABI Platform
pytibero-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 45.6 kB

Release files / pytibero-0.2.0.tar.gz

Download URL pytibero-0.2.0.tar.gz
Size 25.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c2ba066f56b2fcef49cdb0b8256ce9274c30c3f6b986e8d15a4acd0fa35c19d6
BLAKE2b-256 checksum
How to use checksums
76926f764dccdc448de72d725a97db0626e1d7da5edce918af2e68174a4b47dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 18, 2026.

Transparency log

Release files / pytibero-0.2.0-py3-none-any.whl

Download URL pytibero-0.2.0-py3-none-any.whl
Size 20.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
423759e569ffb3b7d575a5969b05e5f58ca706e5a6da48d1561ae34bfa842c37
BLAKE2b-256 checksum
How to use checksums
e82a3ca70592f3397fa7c531945317ffa1aa9e191d1a5a6abb27a0663adc99d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page