File: README.md

package info (click to toggle)
python-anysqlite 0.0.5-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 152 kB
  • sloc: python: 179; sh: 15; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 736 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# 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).


[![PyPI - Version](https://img.shields.io/pypi/v/anysqlite.svg)](https://pypi.org/project/anysqlite)
[![PyPI - Python Version](https://img.shields.io/pyp1i/pyversions/anysqlite.svg)](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',)]
```