Description
YDB Python SDK --- [](https://github.com/ydb-platform/ydb/blob/main/LICENSE) [](https://badge.fury.io/py/ydb) [](https://ydb-platform.github.io/ydb-python-sdk) [](https://github.com/ydb-platform/ydb-python-sdk/actions/workflows/tests.yaml) [](https://github.com/ydb-platform/ydb-python-sdk/actions/workflows/style.yaml) Officially supported Python client for YDB. --- **Documentation**: <a href="https://ydb-platform.github.io/ydb-python-sdk" target="_blank">https://ydb-platform.github.io/ydb-python-sdk</a> --- ## Quickstart ### Prerequisites - Python 3.8 or higher - `pip` version 9.0.1 or higher If necessary, upgrade your version of `pip`: ```sh $ python -m pip install --upgrade pip ``` If you cannot upgrade `pip` due to a system-owned installation, you can run the example in a virtualenv: ```sh $ python -m pip install virtualenv $ virtualenv venv $ source venv/bin/activate $ python -m pip install --upgrade pip ``` Install YDB python sdk: ```sh $ python -m pip install ydb ``` ## Development Instructions on `ydb-python-sdk` development are located in [BUILD.md](BUILD.md).
Release History
| Version | Changes | Urgency | Date |
|---|---|---|---|
| 3.28.0 | Imported from PyPI (3.28.0) | Low | 4/21/2026 |
| 3.27.0 | * Topic Writer Backpressure * Update writer debug logs Full Changelog: [3.26.10...3.27.0](https://github.com/ydb-platform/ydb-python-sdk/compare/3.26.10...3.27.0) | Medium | 4/6/2026 |
| 3.26.10 | * Fix asyncio.Cancelled error propagated to writer/reader * add nearest DC detection with TCP race Full Changelog: [3.26.9...3.26.10](https://github.com/ydb-platform/ydb-python-sdk/compare/3.26.9...3.26.10) | Medium | 4/1/2026 |
| 3.26.9 | * Send writers messages as one batch Full Changelog: [3.26.8...3.26.9](https://github.com/ydb-platform/ydb-python-sdk/compare/3.26.8...3.26.9) | Medium | 4/1/2026 |
| 3.26.8 | * Make "Sent message larger than max" error non retryable * Better observability for errors in token refresh Full Changelog: [3.26.7...3.26.8](https://github.com/ydb-platform/ydb-python-sdk/compare/3.26.7...3.26.8) | Medium | 3/26/2026 |
| 3.26.7 | * Ability to pass additional info to sdk header Full Changelog: [3.26.6...3.26.7](https://github.com/ydb-platform/ydb-python-sdk/compare/3.26.6...3.26.7) | Low | 3/18/2026 |
| 3.26.6 | * Support YDB_USER and YDB_PASSWORD in the environment Full Changelog: [3.26.5...3.26.6](https://github.com/ydb-platform/ydb-python-sdk/compare/3.26.5...3.26.6) | Low | 3/1/2026 |
| 3.26.5 | * Retry SessionExpired in topic streams Full Changelog: [3.26.4...3.26.5](https://github.com/ydb-platform/ydb-python-sdk/compare/3.26.4...3.26.5) | Low | 2/19/2026 |
| 3.26.4 | * Make fail to create session log warn Full Changelog: [3.26.3...3.26.4](https://github.com/ydb-platform/ydb-python-sdk/compare/3.26.3...3.26.4) | Low | 2/9/2026 |
| 3.26.3 | * Fix GrpcWrapperAsyncIO.close for OpenTelemetry intercepted streams Full Changelog: [3.26.2...3.26.3](https://github.com/ydb-platform/ydb-python-sdk/compare/3.26.2...3.26.3) | Low | 2/6/2026 |
| 3.26.2 | * Fix possible race condition in topic common Full Changelog: [3.26.1...3.26.2](https://github.com/ydb-platform/ydb-python-sdk/compare/3.26.1...3.26.2) | Low | 2/5/2026 |
| 3.26.1 | * Fix discovery timeout Full Changelog: [3.26.0...3.26.1](https://github.com/ydb-platform/ydb-python-sdk/compare/3.26.0...3.26.1) | Low | 2/5/2026 |
| 3.26.0 | * Basic mypy support and extended typehints * Drop compatibility with python 3.7 Full Changelog: [3.25.0...3.26.0](https://github.com/ydb-platform/ydb-python-sdk/compare/3.25.0...3.26.0) | Low | 2/4/2026 |
| 3.25.0 | * Add protobuf 6 support Full Changelog: [3.24.1...3.25.0](https://github.com/ydb-platform/ydb-python-sdk/compare/3.24.1...3.25.0) | Low | 1/28/2026 |
| 3.24.1 | * Use session's node_id as preferred endpoint * Fix attach stream finish logic Full Changelog: [3.24.0...3.24.1](https://github.com/ydb-platform/ydb-python-sdk/compare/3.24.0...3.24.1) | Low | 1/26/2026 |
| 3.24.0 | * Refactor session lifecycle * Make DeadlineExceeded not retriable Full Changelog: [3.23.4...3.24.0](https://github.com/ydb-platform/ydb-python-sdk/compare/3.23.4...3.24.0) | Low | 1/23/2026 |
| 3.23.4 | * Allow rollback after TLI Full Changelog: [3.23.3...3.23.4](https://github.com/ydb-platform/ydb-python-sdk/compare/3.23.3...3.23.4) | Low | 1/22/2026 |
| 3.23.3 | * Make attach session error readable Full Changelog: [3.23.2...3.23.3](https://github.com/ydb-platform/ydb-python-sdk/compare/3.23.2...3.23.3) | Low | 1/21/2026 |
| 3.23.2 | * QuerySessionPool: Cancel queue.get in case of cancel of parent coroutine * SnapshotRW isolation mode support Full Changelog: [3.23.1...3.23.2](https://github.com/ydb-platform/ydb-python-sdk/compare/3.23.1...3.23.2) | Low | 1/16/2026 |
| 3.23.1 | * Added SysView scheme type Full Changelog: [3.23.0...3.23.1](https://github.com/ydb-platform/ydb-python-sdk/compare/3.23.0...3.23.1) | Low | 1/12/2026 |
| 3.23.0 | * Coordination Service experimental support Full Changelog: [3.22.4...3.23.0](https://github.com/ydb-platform/ydb-python-sdk/compare/3.22.4...3.23.0) | Low | 12/23/2025 |
| 3.22.4 | * Update default keepalive time to 10s Full Changelog: [3.22.3...3.22.4](https://github.com/ydb-platform/ydb-python-sdk/compare/3.22.3...3.22.4) | Low | 12/18/2025 |
| 3.22.3 | * Make commit_offset call retryable Full Changelog: [3.22.2...3.22.3](https://github.com/ydb-platform/ydb-python-sdk/compare/3.22.2...3.22.3) | Low | 12/10/2025 |
| 3.22.2 | * Make use_all_nodes True by default Full Changelog: [3.22.1...3.22.2](https://github.com/ydb-platform/ydb-python-sdk/compare/3.22.1...3.22.2) | Low | 12/8/2025 |
| 3.22.1 | * Fix crash on discovery thread Full Changelog: [3.22.0...3.22.1](https://github.com/ydb-platform/ydb-python-sdk/compare/3.22.0...3.22.1) | Low | 12/3/2025 |
| 3.22.0 | * Support Arrow format of result sets in QueryService Full Changelog: [3.21.14...3.22.0](https://github.com/ydb-platform/ydb-python-sdk/compare/3.21.14...3.22.0) | Low | 11/27/2025 |
| 3.21.14 | * Fixed bug with param read_from for topic reader Full Changelog: [3.21.13...3.21.14](https://github.com/ydb-platform/ydb-python-sdk/compare/3.21.13...3.21.14) | Low | 11/10/2025 |
| 3.21.13 | * Refactor auth token refresh logic Full Changelog: [3.21.12...3.21.13](https://github.com/ydb-platform/ydb-python-sdk/compare/3.21.12...3.21.13) | Low | 11/1/2025 |
| 3.21.12 | * Fix getattr propagation to wrapped stream Full Changelog: [3.21.11...3.21.12](https://github.com/ydb-platform/ydb-python-sdk/compare/3.21.11...3.21.12) | Low | 9/22/2025 |
| 3.21.11 | * Fix is_view, is_resource_pool for SchemeEntryType Full Changelog: [3.21.10...3.21.11](https://github.com/ydb-platform/ydb-python-sdk/compare/3.21.10...3.21.11) | Low | 9/19/2025 |
| 3.21.10 | * Fix stream error handling Full Changelog: [3.21.9...3.21.10](https://github.com/ydb-platform/ydb-python-sdk/compare/3.21.9...3.21.10) | Low | 9/19/2025 |
| 3.21.9 | * Add method explain for explain query to QuerySession and QuerySessionPool classes Full Changelog: [3.21.8...3.21.9](https://github.com/ydb-platform/ydb-python-sdk/compare/3.21.8...3.21.9) | Low | 8/29/2025 |
| 3.21.8 | * Fix: convert gRPC stream termination to YDB errors in async query client Full Changelog: [3.21.7...3.21.8](https://github.com/ydb-platform/ydb-python-sdk/compare/3.21.7...3.21.8) | Low | 8/22/2025 |
| 3.21.7 | * Remove default timeout from topic stream Full Changelog: [3.21.6...3.21.7](https://github.com/ydb-platform/ydb-python-sdk/compare/3.21.6...3.21.7) | Low | 8/4/2025 |
| 3.21.6 | * Wrap prepare execute request exceptions to ydb.Error * Add async methods to QuerySessionPool * Add default grpc keepalive value * Add detailed debug logs to topic instances Full Changelog: [3.21.5...3.21.6](https://github.com/ydb-platform/ydb-python-sdk/compare/3.21.5...3.21.6) | Low | 7/1/2025 |
| 3.21.5 | * Ability to create Date type from datetime Full Changelog: [3.21.4...3.21.5](https://github.com/ydb-platform/ydb-python-sdk/compare/3.21.4...3.21.5) | Low | 6/18/2025 |
| 3.21.4 | * Add index to resultsets Full Changelog: [3.21.3...3.21.4](https://github.com/ydb-platform/ydb-python-sdk/compare/3.21.3...3.21.4) | Low | 6/16/2025 |
| 3.21.3 | * Rename indexes feature Full Changelog: [3.21.2...3.21.3](https://github.com/ydb-platform/ydb-python-sdk/compare/3.21.2...3.21.3) | Low | 6/6/2025 |
| 3.21.2 | * Add disable_discovery option to DriverConfig Full Changelog: [3.21.1...3.21.2](https://github.com/ydb-platform/ydb-python-sdk/compare/3.21.1...3.21.2) | Low | 5/16/2025 |
| 3.21.1 | * Support Date32, Datetime64, Timestamp64, Interval64 Full Changelog: [3.21.0...3.21.1](https://github.com/ydb-platform/ydb-python-sdk/compare/3.21.0...3.21.1) | Low | 4/25/2025 |
| 3.21.0 | * Reader without Consumer * CommitOffset feature * QueryService stats support Full Changelog: [3.20.1...3.21.0](https://github.com/ydb-platform/ydb-python-sdk/compare/3.20.1...3.21.0) | Low | 4/22/2025 |
| 3.20.1 | * Add missing fields to tablestats * Return topic destructors Full Changelog: [3.20.0...3.20.1](https://github.com/ydb-platform/ydb-python-sdk/compare/3.20.0...3.20.1) | Low | 4/4/2025 |
| 3.20.0 | * Transactions between topics and tables * Remove QuerySessionPool desctuctors Full Changelog: [3.19.3...3.20.0](https://github.com/ydb-platform/ydb-python-sdk/compare/3.19.3...3.20.0) | Low | 3/28/2025 |
| 3.19.3 | * Add consumer_stats to PublicConsumer Full Changelog: [3.19.2...3.19.3](https://github.com/ydb-platform/ydb-python-sdk/compare/3.19.2...3.19.3) | Low | 3/18/2025 |
| 3.19.2 | * Fix async query pool acquire race condition Full Changelog: [3.19.1...3.19.2](https://github.com/ydb-platform/ydb-python-sdk/compare/3.19.1...3.19.2) | Low | 3/7/2025 |
| 3.19.1 | * Fix dynconfig proto usage Full Changelog: [3.19.0...3.19.1](https://github.com/ydb-platform/ydb-python-sdk/compare/3.19.0...3.19.1) | Low | 2/27/2025 |
| 3.19.0 | * protobuf 5 compatibility Full Changelog: [3.18.17...3.19.0](https://github.com/ydb-platform/ydb-python-sdk/compare/3.18.17...3.19.0) | Low | 2/26/2025 |
| 2.15.2 | * Fix import client init Full Changelog: [2.15.1...2.15.2](https://github.com/ydb-platform/ydb-go-sdk/compare/2.15.1...2.15.2) | Low | 2/20/2025 |
| 3.18.17 | * Fix empty result sets from stream Full Changelog: [3.18.16...3.18.17](https://github.com/ydb-platform/ydb-python-sdk/compare/3.18.16...3.18.17) | Low | 2/17/2025 |
| 3.18.16 | * Partition autosplit feature * Transactional retryer * Ignore AttributeError in ydb/import_client.py * add missing scheme entry types Full Changelog: [3.18.15...3.18.16](https://github.com/ydb-platform/ydb-python-sdk/compare/3.18.15...3.18.16) | Low | 2/13/2025 |
