Skip to main content
#KVNDB - A Key-Value Network Database
KVNDB is a simple scalable pure-python key/value database and a client-API.

#Features
- Scalable
- Password protection (optional)
- stores key/value pairs (both needs to be strings)
- pure-python
- asynchronous
- command-line script included
- allows to automatically reset a database and then sync with the other databases
- different database-interfaces included

#Concept
A KVNDB consists of three components:

1. **The Router** is the central manager, which handles all connections and splits the requests.
He also handles the version and password checks.

2. **The Databases** connect to the router and provide the databases.
Every database receive all `set` and `del` commands, but the `get` and `getkeys` commands are randomly splitted.

3. **The Clients** connect to the router and send requests.


#Usage

**using `kvndb`:**

KVNDB includes the `kvndb` script, which will automatically be added to your PATH when the setup is run.
Command: `kvndb [args]`

**Using `python`:**

You can run KVNDB directly as a standalone module using python.
Command: `python - m kvndb [args]`
**Using as a module:**

You can also import `kvndb` for a more flexible setup.

**Modules:**

`kvndb.router`: The router module. The router class is available as `kvndb.router.RouterFactory`.

`kvndb.dbproto`: The code gluing a database and the router togeter. You can access the protocol as `kvndb.dbproto.DatabaseClientProtocol`.

`kvndb.txclient`: The KVNDB client for twisted. You can access the client protocal as `kvndb.txclient.ClientProtocol`.

`kvndb.runner`: The command line interface. You can pass some arguments to `kvndb.runner.run` to parse and run them.

`kvndb.cmdclient`: The command line console. You can subclass `kvndb.cmdclient.KVNDBCmdClient` to extend the command line.

`kvndb.data`: Some constants and other data.

**Arguments:**

You can pass the following arguments to `kvndb`/`python -m kvndb`:

`host`: [ALL] when constructing the endpoint, use this as the host. Default: `0.0.0.0`.

`port`: [ALL] when constructing the endpoint, use this as the port. Default: `54565`.

`1`: [ALL] What mode/database to use. Special modes are `router`(starts the router) and `cmd`(launch a console).

`arguments ARGS`: [DATABASES] pass theses arguments to the database-interface.

`--help`: [ALL] show a help message.

`-t T`; `--type T`: [ALL] endpoint type to use. This may be either `tcp`, `tcp6` or `tls`. For more options, use the `-e` option.

`-e E`; `--endpoint E`: [ALL] use the following string to construct a twisted endpoint. Ignore other arguments which would define an endpoint.

`-p P`; `--password P`: [ALL] When running as a router, set this password as the password. Otherwise, send this password if required.

`-v`; `--verbose`: [ALL] Enable verbose output.

`-l F`; `--logfile F`: [ALL] Log to this file. Requires `-v` to be set.

`-r`: `--reset`: [DATABASES] After connecting to the router, delete all keys from the database and the sync from the other databases connected to the router.



#Requirements
- python2.7
- twisted

#Installation

**Using `pip`:**

Once this module is available on pypi, you can install it using `pip install kvndb`.

**From source:**

1. Download/clone this repository

2. Install requirements

3. Run `python setup.py install` inside this directory. This may require root access.

#License

MIT


**Author**: Benjamin Vogt

**Project homepage:** https://github.com/bennr01/kvndb/

Release files for kvndb 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kvndb 0.1.2
File Size Uploaded
kvndb-0.1.2.tar.gz 12.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kvndb 0.1.2
File Interpreter ABI Platform
kvndb-0.1.2-py2.7.egg Legacy Egg format - - Details

Total release size: 48.6 kB

Release files / kvndb-0.1.2.tar.gz

Download URL kvndb-0.1.2.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
06896213d368aa0a2cbdb9149478ad3dd2367714a586c753453afb33c38b593b
BLAKE2b-256 checksum
How to use checksums
3b10d5a8477f9dacda991585270de3bfd48183ceb701435f204dec0ca791257d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / kvndb-0.1.2-py2.7.egg

Download URL kvndb-0.1.2-py2.7.egg
Size 36.0 kB
Tags Egg
SHA-256 checksum
How to use checksums
441f8246ebf1c3d6959d81cf0bdd11555e50577ddfae0e63b200b6a05c0911d4
BLAKE2b-256 checksum
How to use checksums
5f7a290076302987976ef37b40684bc1a04f70256414d522c105c8bab6a9bb8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1

2 release files

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