YDB Python DBAPI which complies with PEP 249
Project Links
Meta
Author: Yandex LLC
Requires Python: >=3.8,<4.0
Classifiers
Programming Language
- Python :: 3
- Python :: 3.8
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
YDB Python DBAPI
Introduction
Python DBAPI to YDB, which provides both sync and async drivers and complies with PEP249.
Installation
pip install ydb-dbapi
Usage
To establish a new DBAPI connection you should provide host, port and database:
import ydb_dbapi
connection = ydb_dbapi.connect(
host="localhost", port="2136", database="/local"
) # sync connection
async_connection = await ydb_dbapi.async_connect(
host="localhost", port="2136", database="/local"
) # async connection
Usage of connection:
with connection.cursor() as cursor:
cursor.execute("SELECT id, val FROM table")
row = cursor.fetchone()
rows = cursor.fetchmany(size=5)
rows = cursor.fetchall()
Usage of async connection:
async with async_connection.cursor() as cursor:
await cursor.execute("SELECT id, val FROM table")
row = await cursor.fetchone()
rows = await cursor.fetchmany(size=5)
rows = await cursor.fetchall()
0.1.14
Aug 07, 2025
0.1.13
Aug 06, 2025
0.1.12
May 21, 2025
0.1.11
Mar 07, 2025
0.1.10
Feb 27, 2025
0.1.9
Feb 27, 2025
0.1.8
Feb 19, 2025
0.1.7
Jan 13, 2025
0.1.6
Dec 19, 2024
0.1.5
Nov 28, 2024
0.1.4
Nov 27, 2024
0.1.3
Nov 19, 2024
0.1.2
Nov 15, 2024
0.1.1
Nov 13, 2024
0.1.0
Nov 07, 2024
0.0.1b8
Nov 02, 2024
0.0.1b7
Nov 02, 2024
0.0.1b6
Nov 02, 2024
0.0.1b5
Nov 02, 2024
0.0.1b4
Nov 01, 2024
0.0.1b3
Nov 01, 2024
0.0.1b2
Nov 01, 2024
0.0.1b1
Oct 30, 2024
Wheel compatibility matrix
Files in release
Extras:
None
Dependencies:
ydb
(<4.0.0,>=3.21.6)