i am using yaml to store my config data. once i load the file. i want to check if certain Key and Values exist.
yaml content:
sftp:
host: server
username: user
password: pass
path: /mnt/Storage/Folder/
filename: blah
so i need to know if these key values exists in the yaml file. since these are required in order to work properly. what is the best way to do this? i can use this method below, it i would have to manually check on by one. The required key values are going to grow, this is just the minimum.
if (key in data):
return True