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 -
- To temporarily store JSON data for Flask Servers without the need to setup any Database.
- 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 -
- Reduce the read/write time of your database.
- Reduce the size of your storage. (When compared to JSON)
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.
>>> 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 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
- Shril Kumar (@shril)
- Abhishek Srivastava (@abhishekai)
- Janpreet Singh (@janismdhanbad)