parameters:
host: localhost
port: 8080
user: root
PyYAML library
- Install
PyYAML
library from the command line:
pip install PyYAML
- Read data from YAML file:
import yaml
with open('test.yaml', mode='r') as file:
data = yaml.load(file, Loader=yaml.FullLoader)
print(data)
Leave a Comment
Cancel reply