Skip to main content

A simple way to handle database in json.

Project description

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.

    Parameter Type Description
    path string The 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
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easydb-json-1.0.2.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

easydb_json-1.0.2-py3-none-any.whl (2.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page