Skip to navigation
YAML configuration file with python
12.06.22
1. get the yaml library: pip install PyYAML 2. create a yaml file like config.yaml user: foo pass: bar host: master.com 3. create a python script like: #!/usr/bin/env python import yaml with open("config.yaml", "r") as f: config = yaml.load(f, Loader=yaml.FullLoader) print(config)
https://betterdatascience.com/python-yaml-configuration-files/
Reply
Anonymous
Information Epoch 1788896765
Save trees.
Home
Notebook
Contact us