How to use the runtype.Dict function in runtype

To help you get started, we’ve selected a few runtype examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github madisonmay / Runtype / tests / test_typed.py View on Github external
@accepts(d=Dict(key=int, value=object))
def sum_keys(d):
    return sum(d.keys())
github madisonmay / Runtype / tests / test_typed.py View on Github external
@accepts(d=Dict(int, Dict(basestring, float)))
def nested_data_structure(d):
    return