Quick Start¶
Connect to Altibase in 5 minutes with pyaltibase.
Prerequisites¶
Before you start
You need all of the following:
- Running Altibase server
- Python 3.9+
pyodbcinstalled- Altibase ODBC driver installed and visible to your ODBC manager
Driver requirement
pyaltibase is a DB-API wrapper over pyodbc. If pyodbc or the Altibase driver is missing,
connection creation will fail with InterfaceError.
1) Install package¶
2) Choose connection mode¶
3) Run a basic query¶
import pyaltibase
with pyaltibase.connect(host="localhost", port=20300, user="sys", password="manager") as conn:
with conn.cursor() as cur:
cur.execute("SELECT 1")
print(cur.fetchall())
4) Workflow overview¶
mermaid
flowchart LR
A[Install pyaltibase] --> B[Install and verify pyodbc]
B --> C{Connection mode}
C -->|Driver| D[Set host/port/driver]
C -->|DSN| E[Set dsn]
D --> F[Open connection]
E --> F
F --> G[Create cursor]
G --> H[Execute query]
H --> I[Fetch rows]
Gotcha: parameter style
pyaltibase.paramstyle is qmark, so placeholders are ?, not %s or named style.
Next step
Continue with Connection Guide for all connection options and routing details.