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 details)

Uploaded Source

Built Distribution

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

dotcon-0.5.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file dotcon-0.5.1.tar.gz.

File metadata

  • Download URL: dotcon-0.5.1.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.0 Windows/10

File hashes

Hashes for dotcon-0.5.1.tar.gz
Algorithm Hash digest
SHA256 1f79cb0b726d4eb1a7723e37447dd390f5ade98640d265da0a7bb63334326ca4
MD5 bff04c528cce30c283a87cc739685d19
BLAKE2b-256 49a7428d86cb1294f5faa576abe6ce1d198103822657b183e04130538396c33d

See more details on using hashes here.

File details

Details for the file dotcon-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: dotcon-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.0 Windows/10

File hashes

Hashes for dotcon-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a8cdabc7aa78c6fa1a5abba81f20e13adbca4cc7fc0bdafed07a9b7694a91276
MD5 b718f5abc152c106a4e2ea3bd65c5083
BLAKE2b-256 5a6680ed5880d6a30881213da424a0ec6067179e282550845496610a1265afe5

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