I have this yaml file below. I want to read the value from the yaml file and use an API to access a switch.
device.yaml
- hosts
host1: 192.168.1.1
host2: 192.168.1.2
Here is the below python command I want to run using the value of host1
pe2=Server("http://admin:admin@host1/command-api")