Name | ydb-dbapi JSON |
Version |
0.1.14
JSON |
| download |
home_page | None |
Summary | YDB Python DBAPI which complies with PEP 249 |
upload_time | 2025-08-07 14:27:21 |
maintainer | None |
docs_url | None |
author | Yandex LLC |
requires_python | <4.0,>=3.8 |
license | None |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# YDB Python DBAPI
## Introduction
Python DBAPI to `YDB`, which provides both sync and async drivers and complies with [PEP249](https://www.python.org/dev/peps/pep-0249/).
## Installation
```shell
pip install ydb-dbapi
```
## 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()
```
Raw data
{
"_id": null,
"home_page": null,
"name": "ydb-dbapi",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": null,
"author": "Yandex LLC",
"author_email": "ydb@yandex-team.ru",
"download_url": "https://files.pythonhosted.org/packages/a6/db/107dedd07886bf2535c468e69158e4b3eac676a6896e4632060d1d74f93e/ydb_dbapi-0.1.14.tar.gz",
"platform": null,
"description": "# YDB Python DBAPI\n\n## Introduction\n\nPython DBAPI to `YDB`, which provides both sync and async drivers and complies with [PEP249](https://www.python.org/dev/peps/pep-0249/).\n\n## Installation\n\n```shell\npip install ydb-dbapi\n```\n\n## Usage\n\nTo establish a new DBAPI connection you should provide `host`, `port` and `database`:\n\n```python\nimport ydb_dbapi\n\nconnection = ydb_dbapi.connect(\n host=\"localhost\", port=\"2136\", database=\"/local\"\n) # sync connection\n\nasync_connection = await ydb_dbapi.async_connect(\n host=\"localhost\", port=\"2136\", database=\"/local\"\n) # async connection\n```\n\nUsage of connection:\n\n```python\nwith connection.cursor() as cursor:\n cursor.execute(\"SELECT id, val FROM table\")\n\n row = cursor.fetchone()\n rows = cursor.fetchmany(size=5)\n rows = cursor.fetchall()\n```\n\nUsage of async connection:\n\n```python\nasync with async_connection.cursor() as cursor:\n await cursor.execute(\"SELECT id, val FROM table\")\n\n row = await cursor.fetchone()\n rows = await cursor.fetchmany(size=5)\n rows = await cursor.fetchall()\n```\n\n",
"bugtrack_url": null,
"license": null,
"summary": "YDB Python DBAPI which complies with PEP 249",
"version": "0.1.14",
"project_urls": {
"Repository": "https://github.com/ydb-platform/ydb-python-dbapi/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "55f6d560dc1f7b3dada1fa2ca2b2145136d08c7d929d79085b98db9c74f54a50",
"md5": "eadccf206af3cb073f2d8552e20e00ba",
"sha256": "f8f144ce98e2f2c0378ea389656a3faafb73cea93840da7e6f8a81ccb0b1f775"
},
"downloads": -1,
"filename": "ydb_dbapi-0.1.14-py3-none-any.whl",
"has_sig": false,
"md5_digest": "eadccf206af3cb073f2d8552e20e00ba",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 15358,
"upload_time": "2025-08-07T14:27:20",
"upload_time_iso_8601": "2025-08-07T14:27:20.366637Z",
"url": "https://files.pythonhosted.org/packages/55/f6/d560dc1f7b3dada1fa2ca2b2145136d08c7d929d79085b98db9c74f54a50/ydb_dbapi-0.1.14-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a6db107dedd07886bf2535c468e69158e4b3eac676a6896e4632060d1d74f93e",
"md5": "b102f24520bf4d84180dea59dbf86518",
"sha256": "17b17ad7d4c9fecfd8018fc43c7b4b143e7bba02d98d36dd53640087149e299b"
},
"downloads": -1,
"filename": "ydb_dbapi-0.1.14.tar.gz",
"has_sig": false,
"md5_digest": "b102f24520bf4d84180dea59dbf86518",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 14261,
"upload_time": "2025-08-07T14:27:21",
"upload_time_iso_8601": "2025-08-07T14:27:21.135864Z",
"url": "https://files.pythonhosted.org/packages/a6/db/107dedd07886bf2535c468e69158e4b3eac676a6896e4632060d1d74f93e/ydb_dbapi-0.1.14.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-07 14:27:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ydb-platform",
"github_project": "ydb-python-dbapi",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ydb-dbapi"
}