Unofficial Python DB-API 2.0 connector for Tibero
Project description
pytibero
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
tbclibackend for Tibero's native client library path (withDecimalprecision and chunked large-column reads) - Explicit
autocommitplus routedpyodbc.connect(...)keyword support - Package-owned exception hierarchy and type constructors
- Safe access to common
pyodbcconnection metadata such asgetinfo(...) - 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2ba066f56b2fcef49cdb0b8256ce9274c30c3f6b986e8d15a4acd0fa35c19d6
|
|
| MD5 |
c89764336c0499e5b11a42b55c5f5716
|
|
| BLAKE2b-256 |
76926f764dccdc448de72d725a97db0626e1d7da5edce918af2e68174a4b47dc
|
Provenance
The following attestation bundles were made for pytibero-0.2.0.tar.gz:
Publisher:
publish-pypi.yml on yeongseon/pytibero
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytibero-0.2.0.tar.gz -
Subject digest:
c2ba066f56b2fcef49cdb0b8256ce9274c30c3f6b986e8d15a4acd0fa35c19d6 - Sigstore transparency entry: 1339290893
- Sigstore integration time:
-
Permalink:
yeongseon/pytibero@44155a08d3dfd5a0a3439c4628a53f1c75f938fe -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/yeongseon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@44155a08d3dfd5a0a3439c4628a53f1c75f938fe -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
423759e569ffb3b7d575a5969b05e5f58ca706e5a6da48d1561ae34bfa842c37
|
|
| MD5 |
8cc06dad5270bf675d7addad51895d17
|
|
| BLAKE2b-256 |
e82a3ca70592f3397fa7c531945317ffa1aa9e191d1a5a6abb27a0663adc99d3
|
Provenance
The following attestation bundles were made for pytibero-0.2.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on yeongseon/pytibero
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytibero-0.2.0-py3-none-any.whl -
Subject digest:
423759e569ffb3b7d575a5969b05e5f58ca706e5a6da48d1561ae34bfa842c37 - Sigstore transparency entry: 1339290921
- Sigstore integration time:
-
Permalink:
yeongseon/pytibero@44155a08d3dfd5a0a3439c4628a53f1c75f938fe -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/yeongseon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@44155a08d3dfd5a0a3439c4628a53f1c75f938fe -
Trigger Event:
push
-
Statement type: