pysonDB

A Simple , ☁️ Lightweight , 💪 Efficent JSON based database for 🐍 Python. PysonDB-V2 has been released ⬇️

View on GitHub

PysonDB

CLI Commands

Use

pysondb convert [csv file destination] [json file to write]

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Admin\Desktop\pysondb>pysondb convert file.csv file.json
Reading data from file.csv
Writing data into file.json
Conversion Succesfull


pysondb create [name]

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Admin\Desktop\pysondb>pysondb create filedb.json
Succesfull created filedb.json in the directory.

pysondb delete [name]

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Admin\Desktop\pysondb>pysondb delete file2.json
Do you want to remove the json file..(y/n)y
File deleted.

C:\Users\Admin\Desktop\pysondb>pysondb delete filedb.json
Do you want to remove the json file..(y/n)n
Action terminated

pysondb converttocsv [path.json] [target.csv]

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Admin\Desktop\pysondb>pysondb converttocsv example/registry.json 
File converted and saving to  converted.csv
C:\Users\Admin\Desktop\pysondb>pysondb converttocsv example/registry.json filenew.csv
File converted and saving to  filenew.csv

pysondb display [name]

File: filedb.json

{
  "data": [
    {
      "name": "PysonDB",
      "type": "DB",
      "score": "10",
      "id": 5161221802
    },
    {
      "name": "Pyson-CLI",
      "type": "CLI",
      "score": "10",
      "id": 2242313690
    },
    {
      "name": "TinyDb",
      "type": "DB",
      "score": "9",
      "id": 6991190264
    },
    {
      "name": "QWERTY",
      "type": "DB",
      "score": "5",
      "id": 9416036202
    }
  ]
}

Code

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Admin\Desktop\pysondb>pysondb display filedb.json
+-----------+------+-------+------------+
|   name    | type | score |     id     |
+-----------+------+-------+------------+
|  PysonDB  |  DB  |  10   | 5161221802 |
+-----------+------+-------+------------+
| Pyson-CLI | CLI  |  10   | 2242313690 |
+-----------+------+-------+------------+
|   Tiny    |  DB  |   9   | 6991190264 |
+-----------+------+-------+------------+
|  QWERTY   |  DB  |   5   | 9416036202 |
+-----------+------+-------+------------+

Example

gitpod/workspace/pysonDB$ pysondb converttocsv example/registry.json 
File converted and saving to  converted.csv

gitpod /workspace/pysonDB$ pysondb converttocsv example/registry.json filenew.csv
File converted and saving to  filenew.csv