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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytibero-0.2.0.tar.gz (25.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytibero-0.2.0-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file pytibero-0.2.0.tar.gz.

File metadata

  • Download URL: pytibero-0.2.0.tar.gz
  • Upload date:
  • Size: 25.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pytibero-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c2ba066f56b2fcef49cdb0b8256ce9274c30c3f6b986e8d15a4acd0fa35c19d6
MD5 c89764336c0499e5b11a42b55c5f5716
BLAKE2b-256 76926f764dccdc448de72d725a97db0626e1d7da5edce918af2e68174a4b47dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytibero-0.2.0.tar.gz:

Publisher: publish-pypi.yml on yeongseon/pytibero

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pytibero-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pytibero-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pytibero-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 423759e569ffb3b7d575a5969b05e5f58ca706e5a6da48d1561ae34bfa842c37
MD5 8cc06dad5270bf675d7addad51895d17
BLAKE2b-256 e82a3ca70592f3397fa7c531945317ffa1aa9e191d1a5a6abb27a0663adc99d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytibero-0.2.0-py3-none-any.whl:

Publisher: publish-pypi.yml on yeongseon/pytibero

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page