title: How to validate structure (or schema) of dictionary in Python?
body: <p>I have a dictionary with config info:</p>
  
  <pre><code>my_conf = {
      'version': 1,
  
      'info': {
          'conf_one': 2.5,
          'conf_two': 'foo',
          'conf_three': False,
          'optional_conf': 'bar'
      }
  }
  </code></pre>
  
  <p>I want to check if the dictionary follows the structure I need.</p>
  
  <p>I'm looking for something like this:</p>
  
  <pre><code>conf_structure = {
      'version': int,
  
      'info': {
          'conf_one': float,
          'conf_two': str,
          'conf_three': bool
      }
  }
  
  is_ok = check_structure(conf_structure, my_conf)
  </code></pre>
  
  <p>Is there any solution done to this problem or any library that could make  implementing <code>check_structure</code> more easy?</p>