Skip to main content

PyPI version PyPI - Downloads License: MIT

anyio-cysqlite

A Bidning for cysqlite that makes the database asynchronous with any asynchronous library that can be binded to anyio meaning that it will work with many server implementations and applications including FastAPI, Starlette and Litestar to name a few server libraries.

from anyio_cysqlite import connect


async def main():
    async with await connect("cysqlite.db") as db:
        await db.execute("create table IF NOT EXISTS data (k, v)")

        async with db.atomic():
            await db.executemany(
                "insert into data (k, v) values (?, ?)",
                [(f"k{i:02d}", f"v{i:02d}") for i in range(10)],
            )
            print(await db.last_insert_rowid())  # 10.

        curs = await db.execute("select * from data")
        async for row in curs:
            print(row)  # e.g., ('k00', 'v00')

        # We can use named parameters with a dict as well.
        row = await db.execute_one(
            "select * from data where k = :key and v = :val",
            {"key": "k05", "val": "v05"},
        )
        print(row)  # ('k05', 'v05')

        await db.close()


if __name__ == "__main__":
    import anyio

    anyio.run(main)

Updated functionality is better

When it comes to database execution updated functionality normally results in better performance such as providing wrappers for atomic, transaction, and savepoint functions which the standard sqlite3 library doesn't currently have. Instead of having a completely seperate thread for the database all operations are done using the anyio's CapacityLimiter and run_sync making the database less resource heavy.

Batteries included

Unlike cysqlite (As of currently), this library retains access to typehints right out of the box making the library less of a function and attribute guessing game.

Metadata

Release files for anyio-cysqlite 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anyio-cysqlite 0.3.0
File Size Uploaded Provenance Actions
anyio_cysqlite-0.3.0.tar.gz 10.8 kB With provenance Details for anyio_cysqlite-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for anyio-cysqlite 0.3.0
File Interpreter ABI Platform Actions
anyio_cysqlite-0.3.0-py3-none-any.whl Python 3 none any Details for anyio_cysqlite-0.3.0-py3-none-any.whl

Total release size: 20.4 kB

Release files / anyio_cysqlite-0.3.0.tar.gz

Download URL anyio_cysqlite-0.3.0.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
46464f7192f3f6d0503898973aac4a3a73de681f7f03e45ad212cb526513ecab
BLAKE2b-256 checksum
How to use checksums
5f23b886de8f84c13b79f0d1c61fb5b16537c04cbbe4730fe60def83f7d30683
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release files / anyio_cysqlite-0.3.0-py3-none-any.whl

Download URL anyio_cysqlite-0.3.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4616c0edc430ab3a638cb0481bd048a911a061695c3b711a6732b6f7ea07eeb5
BLAKE2b-256 checksum
How to use checksums
f58152668ce1dc0480284c9c1cf3bb048c7e320ecc27bdfb3e133c3e2736d664
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Security for anyio-cysqlite 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for anyio_cysqlite-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page