YAML
Yaml- YAML Ain’t markup langauge
The devices need a standard protocol to communicate between each other , similarly there is requirement of specific standard data format to communicate between application .YAML is one of the data format and is best known to be human friendly means it’s easier to understand and write for human compare to other well know data format such as JSON and XML
YAML document starts with 3 hyphen ‘—‘ at top ,it indicate beginning of YAML document .
We can have mix data types in YAML, let’s see with an yaml example
ex1_ya.yaml
---
IOS: CISCO
JNOS: JUNIPER
CISCO:
- Router
- 7600
- True
- ['interface','ip address']
First and second item i.e IOS: CISCO and JNOS: JUNIPER is dictionary where ‘IOS’ and ‘JNOS’ is key and ‘CISCO’ and ‘JUNIPER’ is respective values
Third Item too is dictionary which comprises of list having different data type as below:
‘Router’ is string type.
‘7600’ is integer type
‘True’ is Boolean type
Fourth item [‘interface’,’ip address’] is list containing strings
Working with YAML using Python
The first and foremost thing to use YAML is to install PyYAML , it’s a YAML parser .
anurudh@anurudh:~/newfolder$ Continue reading







