You are here: Home / LBN / Up2date / Data Science / BastionLinux 36 / python3-ydb-dbapi-0.1.0-1.lbn36.noarch

python3-ydb-dbapi-0.1.0-1.lbn36.noarch

Package Attributes
RPM  python3-ydb-dbapi-0.1.0-1.lbn36.noarch.rpm Architecture  noarch Size  92041 Created  2025/04/21 17:07:24 UTC
Package Specification
Summary YDB Python DBAPI which complies with PEP 249
Group Unspecified
License ZPL
Home Page https://pypi.org/project/ydb-dbapi
Description

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

Requires
(python3.10dist(ydb) < 4~~ with python3.10dist(ydb) >= 3.18.8)  
rpmlib(PayloadFilesHavePrefix)  
rpmlib(PayloadIsZstd)  
rpmlib(PartialHardlinkSets)  
rpmlib(CompressedFileNames)  
rpmlib(RichDependencies)  
rpmlib(FileDigests)  
rpmlib(TildeInVersions)  
Provides
python-ydb-dbapi
python3-ydb-dbapi
python3.10-ydb-dbapi
python3.10dist(ydb-dbapi)
python3dist(ydb-dbapi)
Obsoletes
python-ydb-dbapi

Document Actions