--- id: ydb-dbapi version: "0.1.22" license: unclear license_treatment: unclear maintenance: active --- # ydb-dbapi — YDB Python DBAPI which complies with PEP 249 License: unclear · Maintenance: active · Downloads: 4.1M/mo ## 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 above — 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 pip install ydb-dbapi uv add ydb-dbapi 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_current - Install friction: low - Maintenance: active - Downloads: 4.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags ydb python driver, dbapi database connection, async database client, pep 249 compliance, ydb query execution, python database adapter, sync async db driver, ydb, dbapi, async-support [View on SkillFed](https://skillfed.io/packages/ydb-dbapi) · [View on PyPI](https://pypi.org/project/ydb-dbapi/)