kvault


Namekvault JSON
Version 0.1.0 PyPI version JSON
download
home_page
SummarySimple Miniature key-value datastore
upload_time2023-08-15 10:02:38
maintainer
docs_urlNone
authorBrianLusina
requires_python>=3.10,<4.0
licenseMIT
keywords kvault key-value-datastore key-value
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # kvault

[![License](https://img.shields.io/github/license/brianlusina/kvault)](https://github.com/brianlusina/kvault/blob/main/LICENSE)
[![Tests](https://github.com/BrianLusina/kvault/actions/workflows/tests.yaml/badge.svg)](https://github.com/BrianLusina/kvault/actions/workflows/tests.yaml)
[![Lint](https://github.com/BrianLusina/kvault/actions/workflows/lint.yml/badge.svg)](https://github.com/BrianLusina/kvault/actions/workflows/lint.yml)
[![Docker](https://github.com/BrianLusina/kvault/actions/workflows/docker.yaml/badge.svg)](https://github.com/BrianLusina/kvault/actions/workflows/docker.yaml)
[![Version](https://img.shields.io/github/v/release/brianlusina/kvault?color=%235351FB&label=version)](https://github.com/brianlusina/kvault/releases)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/fbb1708155284277be89e61c867d94ff)](https://www.codacy.com/gh/BrianLusina/kvault/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=BrianLusina/kvault&amp;utm_campaign=Badge_Grade)

`kvault` is a simple Miniature Key-Value Datastore in Python with a [Redis](https://redis.io)-like interface.

## Requirements

1. [Python 3.10+](https://www.python.org/downloads/)

   Python is the programming language of choice for this project, therefore, will be required to be available in
   the system. One can download and setup Python in their local development environment following the steps provided in
   the link.

2. [Poetry](https://python-poetry.org/)

   Poetry is the dependency manager & packaging tool used for this project and can be installed following the setup
   provided in the link as well.

3. [virtualenv](https://virtualenv.pypa.io/)

   Used to create virtual environments for installing & setting up Python dependencies.

## Setup

Running locally, will require a [virtualenv](https://virtualenv.pypa.io/) setup and that can be done by following the
instructions:

```shell
virtualenv .venv
```

> This will create a virtual environment in the current root directory of the project.

Next, install the required dependencies:

```shell
poetry install
```

> This installs the dependencies for the project.

## Running

by default, the `kvault` server runs on localhost:31337.

The following options are supported:

```plain
Usage: kvault.py [options]

Options:
  -h, --help            show this help message and exit
  -d, --debug           Log debug messages.
  -e, --errors          Log error messages only.
  -t, --use-threads     Use threads instead of gevent.
  -H HOST, --host=HOST  Host to listen on.
  -m MAX_CLIENTS, --max-clients=MAX_CLIENTS
                        Maximum number of clients.
  -p PORT, --port=PORT  Port to listen on.
  -l LOG_FILE, --log-file=LOG_FILE
                        Log file.
  -x EXTENSIONS, --extension=EXTENSIONS
                        Import path for Python extension module(s).
```

Note that the above output can be obtained from the below command:

```shell
python cli.py -h
```

To run with debug logging on port 31339, for example:

``` shell
python kvault.py -d -p 31339
``` 

This will result in an output like below:

```plain
  .--.
 /( @ >    ,-.  KVault 127.0.0.1:31339
/ ' .'--._/  /
:   ,    , .'
'. (___.'_/
 ((-((-''

```

> This indicates that the server is running and awaiting client connections

Client setup should be simple, in another terminal, open a new Python console to interact with the kvault server:

```python
from client import Client

client = Client()
client.set('key', {'name': 'Charlie', 'pets': ['mickey', 'huey']})

print(client.get('key'))  # {'name': 'Charlie', 'pets': ['mickey', 'huey']}
```

> A sample of the expected interaction of a client and `kvault` server

##

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "kvault",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "kvault,key-value-datastore,key-value",
    "author": "BrianLusina",
    "author_email": "12752833+BrianLusina@users.noreply.github.com",
    "download_url": "https://files.pythonhosted.org/packages/77/1a/82e672090af6c208829d335dfcdceeeca7a1e75737b9b8844bf731c7d0fe/kvault-0.1.0.tar.gz",
    "platform": null,
    "description": "# kvault\n\n[![License](https://img.shields.io/github/license/brianlusina/kvault)](https://github.com/brianlusina/kvault/blob/main/LICENSE)\n[![Tests](https://github.com/BrianLusina/kvault/actions/workflows/tests.yaml/badge.svg)](https://github.com/BrianLusina/kvault/actions/workflows/tests.yaml)\n[![Lint](https://github.com/BrianLusina/kvault/actions/workflows/lint.yml/badge.svg)](https://github.com/BrianLusina/kvault/actions/workflows/lint.yml)\n[![Docker](https://github.com/BrianLusina/kvault/actions/workflows/docker.yaml/badge.svg)](https://github.com/BrianLusina/kvault/actions/workflows/docker.yaml)\n[![Version](https://img.shields.io/github/v/release/brianlusina/kvault?color=%235351FB&label=version)](https://github.com/brianlusina/kvault/releases)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/fbb1708155284277be89e61c867d94ff)](https://www.codacy.com/gh/BrianLusina/kvault/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=BrianLusina/kvault&amp;utm_campaign=Badge_Grade)\n\n`kvault` is a simple Miniature Key-Value Datastore in Python with a [Redis](https://redis.io)-like interface.\n\n## Requirements\n\n1. [Python 3.10+](https://www.python.org/downloads/)\n\n   Python is the programming language of choice for this project, therefore, will be required to be available in\n   the system. One can download and setup Python in their local development environment following the steps provided in\n   the link.\n\n2. [Poetry](https://python-poetry.org/)\n\n   Poetry is the dependency manager & packaging tool used for this project and can be installed following the setup\n   provided in the link as well.\n\n3. [virtualenv](https://virtualenv.pypa.io/)\n\n   Used to create virtual environments for installing & setting up Python dependencies.\n\n## Setup\n\nRunning locally, will require a [virtualenv](https://virtualenv.pypa.io/) setup and that can be done by following the\ninstructions:\n\n```shell\nvirtualenv .venv\n```\n\n> This will create a virtual environment in the current root directory of the project.\n\nNext, install the required dependencies:\n\n```shell\npoetry install\n```\n\n> This installs the dependencies for the project.\n\n## Running\n\nby default, the `kvault` server runs on localhost:31337.\n\nThe following options are supported:\n\n```plain\nUsage: kvault.py [options]\n\nOptions:\n  -h, --help            show this help message and exit\n  -d, --debug           Log debug messages.\n  -e, --errors          Log error messages only.\n  -t, --use-threads     Use threads instead of gevent.\n  -H HOST, --host=HOST  Host to listen on.\n  -m MAX_CLIENTS, --max-clients=MAX_CLIENTS\n                        Maximum number of clients.\n  -p PORT, --port=PORT  Port to listen on.\n  -l LOG_FILE, --log-file=LOG_FILE\n                        Log file.\n  -x EXTENSIONS, --extension=EXTENSIONS\n                        Import path for Python extension module(s).\n```\n\nNote that the above output can be obtained from the below command:\n\n```shell\npython cli.py -h\n```\n\nTo run with debug logging on port 31339, for example:\n\n``` shell\npython kvault.py -d -p 31339\n``` \n\nThis will result in an output like below:\n\n```plain\n  .--.\n /( @ >    ,-.  KVault 127.0.0.1:31339\n/ ' .'--._/  /\n:   ,    , .'\n'. (___.'_/\n ((-((-''\n\n```\n\n> This indicates that the server is running and awaiting client connections\n\nClient setup should be simple, in another terminal, open a new Python console to interact with the kvault server:\n\n```python\nfrom client import Client\n\nclient = Client()\nclient.set('key', {'name': 'Charlie', 'pets': ['mickey', 'huey']})\n\nprint(client.get('key'))  # {'name': 'Charlie', 'pets': ['mickey', 'huey']}\n```\n\n> A sample of the expected interaction of a client and `kvault` server\n\n##\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Simple Miniature key-value datastore",
    "version": "0.1.0",
    "project_urls": null,
    "split_keywords": [
        "kvault",
        "key-value-datastore",
        "key-value"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a9d5ceb304dbe9d90ddca62622fb40749eeb039f6504fa6e2963387761536817",
                "md5": "f4874511443375835bf6f7ba9a930cfa",
                "sha256": "758bebf758cf0ad6c586f8cb8c7ca587081954a043ff3e652d23d1a1a8ede665"
            },
            "downloads": -1,
            "filename": "kvault-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f4874511443375835bf6f7ba9a930cfa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 22151,
            "upload_time": "2023-08-15T10:02:37",
            "upload_time_iso_8601": "2023-08-15T10:02:37.223975Z",
            "url": "https://files.pythonhosted.org/packages/a9/d5/ceb304dbe9d90ddca62622fb40749eeb039f6504fa6e2963387761536817/kvault-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "771a82e672090af6c208829d335dfcdceeeca7a1e75737b9b8844bf731c7d0fe",
                "md5": "f56aef6e79e0fda32abcf6f06096a24a",
                "sha256": "a4c588360309b0d0085fb5ea01364549e9349d5638a62a32d9cc760f3e3cc195"
            },
            "downloads": -1,
            "filename": "kvault-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f56aef6e79e0fda32abcf6f06096a24a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 19952,
            "upload_time": "2023-08-15T10:02:38",
            "upload_time_iso_8601": "2023-08-15T10:02:38.393149Z",
            "url": "https://files.pythonhosted.org/packages/77/1a/82e672090af6c208829d335dfcdceeeca7a1e75737b9b8844bf731c7d0fe/kvault-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-15 10:02:38",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "kvault"
}
        
Elapsed time: 0.10087s