Skip to main content

kvault

License Tests Lint Docker Version Codacy Badge

kvault is a simple Miniature Key-Value Datastore in Python with a Redis-like interface.

Requirements

  1. Python 3.10+

    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

    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

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

Setup

Running locally, will require a virtualenv setup and that can be done by following the instructions:

virtualenv .venv

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

Next, install the required dependencies:

poetry install

This installs the dependencies for the project.

Running

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

The following options are supported:

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:

python cli.py -h

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

python kvault.py -d -p 31339

This will result in an output like below:

  .--.
 /( @ >    ,-.  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:

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

Metadata

Release files for kvault 0.1.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 kvault 0.1.0
File Size Uploaded Provenance Actions
kvault-0.1.0.tar.gz 20.0 kB Without provenance Details for kvault-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kvault 0.1.0
File Interpreter ABI Platform Actions
kvault-0.1.0-py3-none-any.whl Python 3 none any Details for kvault-0.1.0-py3-none-any.whl

Total release size: 42.1 kB

Release files / kvault-0.1.0.tar.gz

Download URL kvault-0.1.0.tar.gz
Size 20.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a4c588360309b0d0085fb5ea01364549e9349d5638a62a32d9cc760f3e3cc195
BLAKE2b-256 checksum
How to use checksums
771a82e672090af6c208829d335dfcdceeeca7a1e75737b9b8844bf731c7d0fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / kvault-0.1.0-py3-none-any.whl

Download URL kvault-0.1.0-py3-none-any.whl
Size 22.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
758bebf758cf0ad6c586f8cb8c7ca587081954a043ff3e652d23d1a1a8ede665
BLAKE2b-256 checksum
How to use checksums
a9d5ceb304dbe9d90ddca62622fb40749eeb039f6504fa6e2963387761536817
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Security for kvault 0.1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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