Skip to content
/ Kvsqlite Public
forked from AYMENJD/Kvsqlite

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

License

Notifications You must be signed in to change notification settings

2ib/Kvsqlite

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kvsqlite version Downloads

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

Features

  • Fast and easy-to-use database
  • Simultaneously asynchronous or synchronous calls
  • Store any data supported by pickle

Requirements

  • Python3.8+

Installation

pip install kvsqlite

From github (dev version)

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

Documentation

Kvsqlite documentation available at kvsqlite.rtfd.io.

Usage

from kvsqlite import Client # For sync version do: from kvsqlite.sync import Client
import asyncio

async def main():
    async with 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())

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%