Metadata-Version: 2.1
Name: Jconfig
Version: 1.0
Summary: Python config manager using JSON
Home-page: https://github.com/labTifo/jconfig
Author: Labreche Abdellatif
Author-email: abdellatif1898@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown

==========================
Python JSON Config Manager
==========================

Usage
=====

config.json
-----------
.. code-block:: json

    {
        "database": {
            "password": "pass123", 
            "user": "root", 
            "name": "myDB", 
            "tables": {
                "comments": "nan", 
                "likes": "fuck it", 
                "users": "empty"
            }
            "keys": [
                "name",
                "id",
                "hash"
            ],
        }, 
        "server": {
            "port": 4444, 
            "host": "127.0.0.1"
        }
    }


test.py
-------

.. code-block:: python

    from Jconfig.config import Jconfig

    conf = Jconfig('./config.json', separator='.')

    PORT = conf.get('server.port')
    print(PORT) # 4444

    conf.set('database.tables.likes', 'hi bitch')

    conf.set('database.keys', ['md5', 'password', 'another'])

    conf.set('database.keys.2', 'hoho')


