Neat and tidy configs gadget with methods on steroids 🔥
Project description
[WIP] shtuka
installation
pip install -e .
examples
simple
import shtuka
raw_config = {'optim': {'lr': 1e-3}}
config = shtuka.cook(raw_config)
assert raw_config['optim']['lr'] == 1e-3
assert config.optim.lr == 1e-3
non strict
import shtuka
raw_config = {'optim': {}}
config = shtuka.cook(raw_config, strict=False)
assert raw_config.get('optim', {}).get('lr', 5e-2) == 5e-2
assert config.optim.lr.or_(5e-2) == 5e-2
tests
local
pip install -e '.[test]'
pytest
tox
pip install tox
tox
CI
see TravisCI config
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
shtuka-0.1.0.tar.gz
(10.8 kB
view details)
File details
Details for the file shtuka-0.1.0.tar.gz.
File metadata
- Download URL: shtuka-0.1.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61d9e270f963dac4a3f298454df86efb0e264722cc2f4a41e037bf87c5c9540b
|
|
| MD5 |
8447a021b79bcb4d3934e04f36c0ba5b
|
|
| BLAKE2b-256 |
ffc019ee46f8804c73f542c9c632a3e2f3c4befde467d787f01143da3cfd259d
|