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

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


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.1.20.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ydb_dbapi-0.1.20-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file ydb_dbapi-0.1.20.tar.gz.

File metadata

  • Download URL: ydb_dbapi-0.1.20.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ydb_dbapi-0.1.20.tar.gz
Algorithm Hash digest
SHA256 e373e4669513811cb6b56e71aed79f4c164c346724e4d11e2892482f965efc2d
MD5 b60a1be4b60f6af178e12c7e9fce6c8e
BLAKE2b-256 ccf7ee68edc9c901d13b016c154e03d7e5ef7ca662837802ac777e6ac5d392bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for ydb_dbapi-0.1.20.tar.gz:

Publisher: python-publish.yml on ydb-platform/ydb-python-dbapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ydb_dbapi-0.1.20-py3-none-any.whl.

File metadata

  • Download URL: ydb_dbapi-0.1.20-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ydb_dbapi-0.1.20-py3-none-any.whl
Algorithm Hash digest
SHA256 b5f0d8b9c4724565c0750a4034bc0a6c82e5f56e7b54bc8258d02cc8a7120368
MD5 82fc0bddd66ef3578ebd99364ba34ae2
BLAKE2b-256 0d651fad16719bb250b1f3a41be47cdb407927a5a6d0cc0752d9f1fd47ee300a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ydb_dbapi-0.1.20-py3-none-any.whl:

Publisher: python-publish.yml on ydb-platform/ydb-python-dbapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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