DEV Community

Cover image for Introducing DBJson Document Database.

Posted on • Updated on

Introducing DBJson Document Database.

Hello guys today I am here to introduce my 🐶pet project DBJson. It is a Document Oriented Database.

This is a simple data base which stores its data in the form of collections and records format in JSON files!

Structure of data:


This was made by me as sometimes I don't like to setup ORM or Databases for small projects that are never going to production ever.

So I though why not make a make a database for such thing only. I decided to make a NoSQL database as it can store any data without setting up tables as we need to do it with RDBMS.

At its current you can download/view it on Github also check out DBJson's docs here.

At its current stage it can do the following things:

  1. Creating records
  2. Reading records
  3. Updating records
  4. Deleting records
  5. Filter records

What are its inspiration ?

It has got its inspirations from tinyDB ( for its simplicity ) and Firestore( NOSQL database offered by firebase for its document style datamodelling ).

Getting Stated

Getting stated with it is damn easy,

from dbjson.main import DB

# Instatilizing DB class
db = DB()

# Test Data
data = {
  "id": 1,
  "first_name": "Vivyan",
  "last_name": "Treherne",
  "email": "",
  "ip_address": ""
collection = "users"

# Adding Record
data = db.createRecord(collection, data)
# Response -> {'__id__': 'f00ae4e3ca8c3e318a68acc460e5f401', '__data__': {'id': 1, 'first_name': 'Vivyan', 'last_name': 'Treherne', 'email': '', 'ip_address': ''}}

# Updating Record
record_key = "f00ae4e3ca8c3e318a68acc460e5f401"
to_update = [
    {"email": ""},
    {"ip_address": ""}
data = db.updateRecord(collection, "f00ae4e3ca8c3e318a68acc460e5f401", to_update)
# Response -> {'id': 1, 'first_name': 'Vivyan', 'last_name': 'Treherne', 'email': '', 'ip_address': ''}

# Deleting Record
db.removeRecord(collection, record_key)
Enter fullscreen mode Exit fullscreen mode

That's all you need to generate use your db. This is still in its very early stage of development so it may be unstable and may be subjected to change, so if you want to follow it updates you can follow it on GitHub or you can follow me here on

You can explore all its features at

Hope you guys like it. You can contribute it too at

Top comments (7)

fredysomy profile image
Fredy Somy

Great one..
I also have built a similar one .. give a look..

ketanip profile image

It's amazing, loved it. Can you please share how you created the documentation for it ( manually or automatically ) ?

fredysomy profile image
Fredy Somy

Thank you...
It was all done manually ..

Thread Thread
ketanip profile image

Can you suggest some features to add in it ?

Thread Thread
fredysomy profile image
Fredy Somy

Are you in twiiter..just followed you.. we can talk there

vivekkodira profile image
Vivek Kodira

Nice! There is a similar nodejs express repo called json-server ( Sharing in case it helps you.

ketanip profile image

Yes it is somewhat like it, and you have given me an idea that we can cover it in an API cover, so it could be used with any language.

Thanks for your response.