title: Validate dicts in Python
body: <p><br>
  i looking for tool, or examples to/how to validate dictionaries in python.<br>
  For example, i have dict:</p>
  
  <pre><code>test = {'foo' : 'bar', 'nested' : {'foo1' : 'bar1', 'foo2' : 'bar2'} }
  </code></pre>
  
  <p>And now i must validate it. Lets say, value for key <code>foo</code> must be boolean <strong>False</strong> or non-empty string. Next, if key <code>foo1</code> have value <code>bar1</code>, that key <code>foo2</code> <strong>must</strong> be int in range <code>1..10</code>. I wrote simple function to do this, but this is not what i exactly want. Yea, sure, i can test every single item in dict with <code>if..else</code>, but if dict have >50 elements, then it is a bit not comfortable.</p>
  
  <p>Is there any good tool/lib to do this in Python? I not looking for parsers, only <em>fast</em> and effective way to do this right.</p>