Skip to content

shril/thanosdb

Repository files navigation

thanosdb

Maintenance made-with-python contributions welcome Build Status License: MIT Documentation Status

ThanosDB

A lightweight, fast and simple database based on msgpack module. It is an platform agnostic, open-source key-value store. There are two primary reasons why this project came into existence -

  1. To temporarily store JSON data for Flask Servers without the need to setup any Database.
  2. To act as an alternative to Redis, since there is no official support of Redis on windows (Drawbacks of Redis on Windows).

In order to justify its name, it will try to -

  1. Reduce the read/write time of your database.
  2. Reduce the size of your storage. (When compared to JSON)

Why ThanosDB uses MessagePack instead of using JSON, BSON?

MessagePack is an efficient binary serialization format. It lets us exchange data among multiple languages like JSON. But it's faster and smaller. Small integers are encoded into a single byte, and typical short strings require only one extra byte in addition to the strings themselves.

Benchmarking - MessagePack outperforms every other Data Serialization formats.

Get, Set, Snap

>>> from thanosdb import thanosdb
>>> db = thanosdb.load('test.db', False)
>>> db.set('key', 'value')
True
>>> db.get('key')
'value'
>>> db.dump()
True

Tutorial - Introduction to ThanosDB

Testing

Testing in ThanosDB is done using Python's unittest module.

In order to run test go inside the package directory and run the following command

python -m unittest

Developers -

About

thanosDB is an open source key-value store using Python's msgpack module.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published