skillfed

ydb-dbapi

YDB Python DBAPI which complies with PEP 249

ydb-dbapi v0.1.22 4.1M downloads/30d#2,388 on PyPI4
License unclear Active released

What it is and what it does

ydb-dbapi is a Python database adapter that bridges Python applications to YDB, a distributed SQL database. It implements the standard Python DBAPI interface (PEP 249), allowing developers to use familiar connection, cursor, and query patterns. The driver offers both synchronous and asynchronous APIs, so you can choose blocking or non-blocking execution depending on your application's needs.

The package handles parameter binding in two modes: a standard Python DB-API mode with %(name)s and %s placeholders (opt-in via pyformat=True), and a native YDB mode using $name placeholders. It automatically maps Python types (bool, int, float, str, bytes, datetime, Decimal) to YDB types, and lets you override type inference with ydb.TypedValue when needed. The single runtime dependency is ydb itself, keeping the install footprint minimal.

Use it for:

  • Building Python web applications that need to query YDB as their primary data store using standard DBAPI patterns.
  • Writing async Python services that require non-blocking database access to YDB without blocking the event loop.
  • Migrating from other databases to YDB by using familiar PEP 249 connection and cursor semantics.
  • Executing parameterized queries with automatic type conversion from Python values to YDB types.
  • Using explicit type control via ydb.TypedValue when automatic inference doesn't match the required YDB schema.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Python DBAPI driver for YDB that provides sync and async database connections compliant with PEP 249, supporting parameterized queries with automatic type mapping.

Yes, if you are using YDB and need a standard Python database adapter. The package is actively maintained, has low install friction, and complies with PEP 249. However, verify the license terms (currently unclear in the metadata) before committing to production use, and note that the project is relatively young (first release October 2024).

Install

ydb-dbapi on PyPI

pip

pip install ydb-dbapi

uv

uv add ydb-dbapi

poetry

poetry add ydb-dbapi

Installing ydb-dbapi

Before you install

Low friction install with a single runtime dependency (ydb). Actively maintained with recent commits and releases within the last year.

License in practice

License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms before use in proprietary or restricted contexts.

Quickstart

pip install ydb-dbapi

import ydb_dbapi

connection = ydb_dbapi.connect(
    host="localhost", port="2136", database="/local"
)
with connection.cursor() as cursor:
    cursor.execute("SELECT id, val FROM table")
    rows = cursor.fetchall()

Requires a running YDB server accessible at the specified host and port; connection details (host, port, database) must be provided.

Verify before relying

  • Whether the package is actively maintained beyond the last commit date shown (2026-08-06).
  • Production readiness and stability guarantees given the relatively recent first release (2024-10-30).
  • Performance characteristics and scalability limits for high-volume query workloads.

Package facts

License not declared (unclear)
Python support supports the current Python release (<4.0,>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 1 — ydb
Maintenance actively maintained — 94 days since the last release
Last repo commit
First released
Downloads 4,056,770/month — #2,388 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: ydb_dbapi-0.1.22-py3-none-any.whl

Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

ydb python driverdbapi database connectionasync database clientpep 249 complianceydb query executionpython database adaptersync async db driver
ydbdbapiasync-support

More Front-Ends packages