pysonDB

A Simple, Lightweight, Efficent JSON based DataBase for Python.

The current stable version is v0.6.0

pip install pysondb==0.6.0

Features

  • Lightweight JSON based database.

  • Supports CRUD commands.

  • No Database drivers required.

  • Unique ID assigned for each JSON document added.

  • Strict about Schema of data added.

  • Inbuilt CLI to delete,display,create JSON database.

    from pysondb import db
    a=db.getDb("path/to/json.json")
    a.addMany([{"name":"pysondb","type":"DB"},{"name":"pysondb-cli","type":"CLI"}])
    a.getAll()
    [{"name":"pysondb","type":"DB"},{"name":"pysondb-cli","type":"CLI"}]

  • See its simple..

Install

pip install pysondb

Create a database

  • You can create a database using CLI.

    pysondb create database_name

  • Or in the python file.

    from pysondb import db

    a=db.getDb("db.json')

  • The above piece of code will create a database with {data:[]} in it.

  • Even if the json file exists there is no problem.

See more Documentation here

What makes pysonDB different

  • CLI support to create,delete and display database.
  • Unique Id automatically assigned for each JSON data added.
  • Schema regularity is checked.

What pysonDB can't do.

  • Cannot store images,videos etc.

TODO

  • CLI to convert CSV to pysonDB required json.
  • Use CSV file in the database.
  • Make the database available to use local servers (Flask,Django)

GitHub

https://github.com/fredysomy/pysonDB