Search code examples
rediskey-value-storeleveldbrocksdb

Need Persistent key value store which can be accessed via http


I am looking for a persistent key DB which can be accessed via HTTP. I need to use it for storing postman test script data. I have heard of rocksdb and leveldb, but I am not sure whether they can be accessed via HTTP.


Solution

  • leveldb and rocksdb don't have a network component.

    I created a small python project that does expose a document datastore like API that you can query using REST. Have a look at it https://github.com/amirouche/deuspy. It rely on leveldb for persistence.

    There is a python asyncio client. You can create a client on your own it's very easy.

    To get started, you can simply do the following:

    pip3 install deuspy
    python3 -m deuspy.server
    

    And then start querying.

    Here is an example curl-based session:

    $ curl -X GET http://localhost:9990
    {}
    $ curl -X POST --data '{"héllo": "world"}' http://localhost:9990
    3252169150753703489
    $ $ curl -X GET http://localhost:9990/3252169150753703489
    {"h\u00e9llo": "world"}
    

    You can also filter documents. Look at how is implemented the asyncio client.