eth2.0-specs/test_libs/config_helpers
Danny Ryan 43132a3082
[reopen] Eth2 shorthand standardized (#1452)
* Update README.md

* Update README.md

* Update p2p-interface.md

* Update simple-serialize.md

* Update README.md

* Update initialization.md

* Update README.md

* Update 0_beacon-chain-validator.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md
2019-10-28 15:53:10 +08:00
..
preset_loader update testgen, make epoch proc work 2019-07-26 22:40:49 +02:00
README.md [reopen] Eth2 shorthand standardized (#1452) 2019-10-28 15:53:10 +08:00
requirements.txt Update config_helper requirements. 2019-10-24 09:32:57 +11:00
setup.py Update config_helper requirements. 2019-10-24 09:32:57 +11:00

README.md

Eth2 config helpers

preset_loader: A util to load constants-presets with. See Constants-presets documentation.

Usage:

configs_path = 'configs/'

...

import preset_loader
from eth2spec.phase0 import spec
my_presets = preset_loader.load_presets(configs_path, 'mainnet')
spec.apply_constants_preset(my_presets)

WARNING: this overwrites globals, make sure to prevent accidental collisions with other usage of the same imported specs package.