Skip to main content

Python config manager using JSON

Project description

========================== 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')

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

Jconfig-1.0.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Jconfig-1.0-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file Jconfig-1.0.tar.gz.

File metadata

  • Download URL: Jconfig-1.0.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Jconfig-1.0.tar.gz
Algorithm Hash digest
SHA256 189d15dc36a74a65e14d8d6ed9f3ea2b3d4d0f62c76c00be04f62abe903fdb99
MD5 5fab2e62b35c23c27487d177b0265aae
BLAKE2b-256 3d14cdc52f319d83202748fcb8aafae95c9c56a188230c5e2f158c6bec009808

See more details on using hashes here.

File details

Details for the file Jconfig-1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for Jconfig-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 311f3f2725ce95d307d423ba73ecb2cf4fae8d068b5b978eaf39fd1b3bd77d77
MD5 7256a4f8607187d3e671f58ac607b0d5
BLAKE2b-256 aa9ef9df860401c3f11ddaa4ca2dabe56e02420e43929667f2d76731b0118190

See more details on using hashes here.

Supported by

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