Skip to content

AidanInceer/DotConfig

Repository files navigation

DotConfig

Static Badge

A simple package which converts a standard python dictionary to a dot accessible configuration object.

Installation

pip install dotcon

Usage

from dotcon import DotConfig

mydict = {
    "A": [1, 2, 3, 4],
    "B": {"C": 5},
    "D": "E",
    "F": None,
}

ddict = DotConfig(mydict)

ddict.A
>>> [1, 2, 3, 4]

# Or the regular way

ddict['A']
>>> [1, 2, 3, 4]

ddict.B
>>> {"C": 5}

ddict.B.C
>>> 5

ddict.D
>>> "E"

ddict.F
>>> None

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages