You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

easydb-json

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easydb-json

A simple way to handle database in json.

1.0.2
pipPyPI
Maintainers
1

Install

  • Linux : python3 -m pip install easydb-json
  • Windows : python -m pip install easydb-json

Author

Discord : Lactua#6319

Github: https://github.com/lactua

Documentation

  • Get started

    To start, you have to create your database in your code by using the init function.

    init (function)

    The init function return you a dict that you can edit and that will be saved in the path that you gave.

    ParameterTypeDescription
    pathstringThe path of the database file

    Example :

    from easydbjson import init
    
    mydb = init('NiceDir/NiceFile.json')
    
  • Interact with the database

    When you edit the dict that is return from the init function, it automaticly edit the database file. So to interact with the database, interact with the dict.

    Example :

    from easydbjson import init
    
    mydb = init('NiceDir/NiceFile.json')
    
    mydb['name'] = 'Lactua'
    print(mydb['name'])
    
    mydb['name'] = 'Luctau'
    print(mydb['name'])
    
    del mydb['name']
    

    Output :

    Lactua
    Luctau
    

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts