YDB Python DBAPI which complies with PEP 249
Project 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()
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 ydb_dbapi-0.1.15.tar.gz.
File metadata
- Download URL: ydb_dbapi-0.1.15.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcf485c3c782d7ee3840239892e1c27217b53a19efcc289fa8218440f9413f6d
|
|
| MD5 |
ed658abe629dfff871d19fd4d39ce6e3
|
|
| BLAKE2b-256 |
2ec5933968c485e91505bbae156d546c0a9c4a8d6c03ef6d935c1abf5153764a
|
Provenance
The following attestation bundles were made for ydb_dbapi-0.1.15.tar.gz:
Publisher:
python-publish.yml on ydb-platform/ydb-python-dbapi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ydb_dbapi-0.1.15.tar.gz -
Subject digest:
fcf485c3c782d7ee3840239892e1c27217b53a19efcc289fa8218440f9413f6d - Sigstore transparency entry: 729240014
- Sigstore integration time:
-
Permalink:
ydb-platform/ydb-python-dbapi@581bd34d79a98b3cfb0f32a17d29aa31022ac99b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ydb-platform
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@581bd34d79a98b3cfb0f32a17d29aa31022ac99b -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file ydb_dbapi-0.1.15-py3-none-any.whl.
File metadata
- Download URL: ydb_dbapi-0.1.15-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e23ce5dc1d392ea7b8d16e077dfb5a803e5280aea4366fbb409d2ecf450edd91
|
|
| MD5 |
16d72cf1a7fecef57471161e87b6b98d
|
|
| BLAKE2b-256 |
2255186e505c4119569489cd85d977e253d46e53e75a1f883be200476832239c
|
Provenance
The following attestation bundles were made for ydb_dbapi-0.1.15-py3-none-any.whl:
Publisher:
python-publish.yml on ydb-platform/ydb-python-dbapi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ydb_dbapi-0.1.15-py3-none-any.whl -
Subject digest:
e23ce5dc1d392ea7b8d16e077dfb5a803e5280aea4366fbb409d2ecf450edd91 - Sigstore transparency entry: 729240017
- Sigstore integration time:
-
Permalink:
ydb-platform/ydb-python-dbapi@581bd34d79a98b3cfb0f32a17d29aa31022ac99b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ydb-platform
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@581bd34d79a98b3cfb0f32a17d29aa31022ac99b -
Trigger Event:
workflow_dispatch
-
Statement type: