A tiny module for creating cascade configs
Project description
multicon
A tiny module for joining multiple configs into one.
Usage
import multicon
c1 = {
'a': 123,
'b': 256,
'c': [1, 2, 3],
'd': {
'da': 1,
'db': 2,
'dc': 3,
'dd': {
'dda': 997
}
}
}
c2 = {
'b': 112,
'e': 9427
}
c = Config(c1, c2)
print(dict(c))
import multicon
c1 = {
'a': 123,
'b': 256,
'c': [1, 2, 3],
'd': {
'da': 1,
'db': 2,
'dc': 3,
'dd': {
'dda': 997
}
}
}
c2 = {
'b': 112,
'e': 9427
}
c3 = {
'd': {
'db': 18,
'dd': [1, 2, 3, 4, 5, 6, 7],
}
}
multiconfig = multicon.MultiConfig([c1, c2, c3], {})
try:
print(multiconfig['a'])
print(multiconfig['b'])
print(multiconfig['c'])
print(multiconfig['d'])
print(multiconfig['dd'])
except multicon.ConfigKeyNotExistError:
print('Key not exist')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
multicon-0.0.1.tar.gz
(2.0 kB
view details)
Built Distribution
File details
Details for the file multicon-0.0.1.tar.gz
.
File metadata
- Download URL: multicon-0.0.1.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab429cb2dd8eab8a38cdccee9c0bd8d2ecbe4f73dea0aafa1326d37d5f57d16f |
|
MD5 | f50fbf013c3e9c8f5ce152cef7ff7c6f |
|
BLAKE2b-256 | d0198d819a127c93749b28ba42f5b03a85a483709c92ec00b53fabab62f93d41 |
File details
Details for the file multicon-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: multicon-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37ec462d207a3a9874633593ab87d8045de7b9887f3e60cf72c225975cff1a6e |
|
MD5 | d8fa28575b0d867e4d27c089e1df660a |
|
BLAKE2b-256 | 66c71e1c16a2502fc8fd0564a7f191648d1c485cefb36f30aae8b000dd503a8f |