Skip to main content

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

Project description

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

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

dotcon-0.5.1.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

dotcon-0.5.1-py3-none-any.whl (2.8 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