Kvsqlite


NameKvsqlite JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://github.com/AYMENJD/Kvsqlite
SummaryEasy-to-use synchronous/asynchronous key-value database backed by sqlite3.
upload_time2023-05-14 12:30:05
maintainer
docs_urlNone
authorAYMEN Mohammed
requires_python>=3.8
licenseMIT
keywords sync asyncio sqlite sqlite3 key-value database redis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Kvsqlite [![version](https://img.shields.io/pypi/v/Kvsqlite?style=flat&logo=pypi)](https://pypi.org/project/Kvsqlite) [![Downloads](https://static.pepy.tech/personalized-badge/Kvsqlite?period=month&units=none&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/Kvsqlite)
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**](https://docs.python.org/3/library/pickle.html)

### Requirements

- Python3.8+

### Installation

```bash
pip install kvsqlite
```
From github (dev version)
```bash
pip install git+https://github.com/AYMENJD/Kvsqlite
```

### Documentation

[Kvsqlite](https://github.com/AYMENJD/Kvsqlite) documentation available at [kvsqlite.rtfd.io](https://kvsqlite.rtfd.io/).

### Usage

```python
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)

            await db.setex(key, "This key has a lifetime of 60 seconds", 60)

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


asyncio.run(main())
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/AYMENJD/Kvsqlite",
    "name": "Kvsqlite",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "sync,asyncio,sqlite,sqlite3,key-value,database,redis",
    "author": "AYMEN Mohammed",
    "author_email": "let.me.code.safe@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/a4/1c/8a3344b8d5a3397b25a1be7464edcb2263c2e4a168d411f8e3a357f3abc0/Kvsqlite-0.2.1.tar.gz",
    "platform": null,
    "description": "# Kvsqlite [![version](https://img.shields.io/pypi/v/Kvsqlite?style=flat&logo=pypi)](https://pypi.org/project/Kvsqlite) [![Downloads](https://static.pepy.tech/personalized-badge/Kvsqlite?period=month&units=none&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/Kvsqlite)\nEasy, Sample and powerful key-value database backed by sqlite3.\n\n### Features\n\n- Fast and easy-to-use database\n- Simultaneously **asynchronous** or **synchronous** calls\n- Store any data supported by [**pickle**](https://docs.python.org/3/library/pickle.html)\n\n### Requirements\n\n- Python3.8+\n\n### Installation\n\n```bash\npip install kvsqlite\n```\nFrom github (dev version)\n```bash\npip install git+https://github.com/AYMENJD/Kvsqlite\n```\n\n### Documentation\n\n[Kvsqlite](https://github.com/AYMENJD/Kvsqlite) documentation available at [kvsqlite.rtfd.io](https://kvsqlite.rtfd.io/).\n\n### Usage\n\n```python\nfrom kvsqlite import Client # For sync version do: from kvsqlite.sync import Client\nimport asyncio\n\nasync def main():\n    async with Client(\"kv.sqlite\") as db:\n\n        key = \"123-456-789\"\n        result = await db.set(key, \"Hello world. Bye!\")\n\n        if await db.exists(key):\n            get_key = await db.get(key)\n\n            print(get_key) # Hello world. Bye!\n\n            await db.delete(key)\n\n            await db.setex(key, \"This key has a lifetime of 60 seconds\", 60)\n\n            print(await db.get(key))\n        else:\n            print(\"Key not found\", result)\n\n\nasyncio.run(main())\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Easy-to-use synchronous/asynchronous key-value database backed by sqlite3.",
    "version": "0.2.1",
    "project_urls": {
        "Documentation": "https://kvsqlite.rtfd.io/",
        "Homepage": "https://github.com/AYMENJD/Kvsqlite",
        "Source": "https://github.com/AYMENJD/Kvsqlite",
        "Tracker": "https://github.com/AYMENJD/Kvsqlite/issues"
    },
    "split_keywords": [
        "sync",
        "asyncio",
        "sqlite",
        "sqlite3",
        "key-value",
        "database",
        "redis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a41c8a3344b8d5a3397b25a1be7464edcb2263c2e4a168d411f8e3a357f3abc0",
                "md5": "bd62f297d588d713d44b76ba296c889d",
                "sha256": "2d5626dc8c6a672c9c3f4143d43164ce2337aa161bef57e7397a5c663dc44017"
            },
            "downloads": -1,
            "filename": "Kvsqlite-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "bd62f297d588d713d44b76ba296c889d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 9788,
            "upload_time": "2023-05-14T12:30:05",
            "upload_time_iso_8601": "2023-05-14T12:30:05.423974Z",
            "url": "https://files.pythonhosted.org/packages/a4/1c/8a3344b8d5a3397b25a1be7464edcb2263c2e4a168d411f8e3a357f3abc0/Kvsqlite-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-14 12:30:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "AYMENJD",
    "github_project": "Kvsqlite",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "kvsqlite"
}
        
Elapsed time: 1.00866s