Overdub
Load and merge nested configurations.
Usage
Installation:
python -m pip install overdub
With these structures:
from overdub import MutableOverdub
a = {'foo': 1, 'bar': {'baz': 2}, 'qux': {'one': 1}}
b = {'foo': 3, 'bar': {'baz': 4}, 'qux': {'two': 2}}
Update:
overdubbed = MutableOverdub(a)
overdubbed.update(b)
assert overdubbed.foo == 3
assert overdubbed.bar.baz == 4
assert overdubbed.qux == {'two': 2}
Merge:
overdubbed = MutableOverdub(a)
overdubbed.merge(b)
assert overdubbed.foo == 3
assert overdubbed.bar.baz == 4
assert overdubbed.qux == {'one': 1, 'two': 2}
Rebase:
overdubbed = MutableOverdub(a)
overdubbed.rebase(b)
assert overdubbed.foo == 1
assert overdubbed.bar.baz == 2
assert overdubbed.qux == {'one': 1, 'two': 2}
Unbound the data:
overdubbed = MutableOverdub(a) assert isinstance(overdubbed, Overdub) naked = MutableOverdub(a) assert not isinstance(naked, Overdub)
Freeze configuration:
overdubbed = overdubbed.frozen()
YAML files
It can also read configuration from yaml files, for this install:
python -m pip install overdub[yaml]
And then, merge all files:
from overdub import yaml
overdubbed = yaml.load_from_file('a.yml', b.yml')
assert overdubbed.foo == 3
assert overdubbed.bar.baz == 4
assert overdubbed.qux == {'one': 1, 'two': 2}
Metadata
Release files for overdub 0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| overdub-0.7.tar.gz | 18.2 kB | Without provenance | Details for overdub-0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| overdub-0.7-py2-none-any.whl | Python 2 | none | any | Details for overdub-0.7-py2-none-any.whl |
Total release size: 27.1 kB
Release files / overdub-0.7.tar.gz
| Download URL | overdub-0.7.tar.gz |
|---|---|
| Size | 18.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1a660afc71d408312b0b06932c9c9c6285bec86f48a17b68e1bf1dee395c9c7
|
|
BLAKE2b-256 checksum How to use checksums |
71c19f0765f666143bede020394c784a74dd41d5a8352a8f896d6ee1d1f1c3f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / overdub-0.7-py2-none-any.whl
| Download URL | overdub-0.7-py2-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
b229fc927b4e5341231ef347d183a0820173e367e6ec859f04c2c9157795f48c
|
|
BLAKE2b-256 checksum How to use checksums |
04c92b2911524b24df5f9037c22809608ddaac08b715179d69dd88452708cac5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for overdub 0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.