Skip to main content

Easy-to-use asynchronous key-value database backed by sqlite3.

Project description

Kvsqlite version downloads

Easy, Sample and powerful key-value database backed by sqlite3.

Requirements

  • Python3.8+

Installation

pip install kvsqlite

From github (dev version)

pip install git+https://github.com/AYEMNJD/Kvsqlite

Usage

import kvsqlite, asyncio

async def main():
    async with kvsqlite.Client("kv.sqlite") as db:

        key = "123-456-789"
        result = await db.set(key, "Hello world. Bye!")

        if await db.exists(key):
            get_key = await db.get(key)

            print(get_key) # Hello world. Bye!

            await db.delete(key)
        else:
            print("Key not found", result)

        await db.close()

asyncio.run(main())

Check all available methods at https://kvsqlite.rtfd.io/en/latest/API.html.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Kvsqlite-0.1.1.tar.gz (6.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page