database.yml
domain1:ras
signature 1:RAS
dtaf:{X,Y,Z,M}
serial:{NA}
dmesg:{NA}
verdict:{setup issue}
analysis:{xyz}
import yaml
with open('database.yml', 'r') as f:
doc = yaml.load(f, Loader=yaml.FullLoader)
data = doc["domain1"]
print (data)
output >> ras signature1:RAS dtaf:{X,Y,Z,M} serial:{NA} dmesg:{NA} verdict:{setup issue} analysis:{xyz}
I need the key value of "serial" which is {NA}