Skip to main content

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

TBD after first release

Usage

To establish a new DBAPI connection you should provide host, port and database:

```python
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:

```python
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:

```python
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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ydb_dbapi-0.0.1b5.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

ydb_dbapi-0.0.1b5-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file ydb_dbapi-0.0.1b5.tar.gz.

File metadata

  • Download URL: ydb_dbapi-0.0.1b5.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.7

File hashes

Hashes for ydb_dbapi-0.0.1b5.tar.gz
Algorithm Hash digest
SHA256 496706ffdd3501e32da7f6db28f6338579343ef845b6ea23becfbd90ae6d1f02
MD5 176dde1792ad36f0f8ecbbdd6c9a4c95
BLAKE2b-256 e286bc3a96136b5b140a42e25da9d76b284a8eea72ac0ff01542c4c05fa2747d

See more details on using hashes here.

File details

Details for the file ydb_dbapi-0.0.1b5-py3-none-any.whl.

File metadata

  • Download URL: ydb_dbapi-0.0.1b5-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.7

File hashes

Hashes for ydb_dbapi-0.0.1b5-py3-none-any.whl
Algorithm Hash digest
SHA256 092a9c08c209854982d3978f3b4b6d3e82f957981e04ffb9b905b57d0e24b7ac
MD5 f7b0cfc5780c6d28a6bc1f618aa38553
BLAKE2b-256 127d98015396f24379caf93c40df6d39fa813541320ed63310cdb2126dd17327

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page