https://github.com/karpetrosyan/anysqlite
sqlite3 for asyncio and trio
https://github.com/karpetrosyan/anysqlite
Last synced: 3 months ago
JSON representation
sqlite3 for asyncio and trio
- Host: GitHub
- URL: https://github.com/karpetrosyan/anysqlite
- Owner: karpetrosyan
- License: bsd-3-clause
- Created: 2023-09-29T08:44:35.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-07-10T09:05:05.000Z (11 months ago)
- Last Synced: 2025-03-18T21:54:38.761Z (3 months ago)
- Language: Python
- Homepage:
- Size: 32.2 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# anysqlite
Anysqlite provides an `async/await` interface to the standard `sqlite3` library and supports both `trio` and `asyncio` backends using the power of [Anyio](https://github.com/agronholm/anyio).
[](https://pypi.org/project/anysqlite)
[](https://pypi.org/project/anysqlite)-----
## Installation
```console
pip install anysqlite
```## Basic usage
``` python
>>> import anysqlite
>>>
>>> conn = await anysqlite.connect(":memory:")
>>> cursor = await conn.execute("SELECT DATETIME()")
>>>
>>> response = await cursor.fetchone()
>>> print(response)
[('2023-10-02 13:42:42',)]
```