title: Python Yaml check config file
body: <p>i am using yaml to store my config data. once i load the file. i want to check if certain Key and Values exist.</p>
  
  <p>yaml content:</p>
  
  <pre><code>sftp:
   host: server
   username: user
   password: pass
   path: /mnt/Storage/Folder/
  
  filename: blah
  </code></pre>
  
  <p>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.</p>
  
  <pre><code>if (key in data):
      return True
  </code></pre>