Basic Python based tool to check schema of two dictionaries
Nope.
It checks for nested dictionaries. So, yes.
Python 3.7
None.
Github: https://github.com/sumitmukhija/ScheMatch PyPi: https://pypi.org/project/ScheMatch/0.22/
-
Install
pip install ScheMatch==0.22
-
Import
from schematch import match
-
Prepare input
dicOne = {"name":"Sumit", "likes": "sleeping"}
dicTwo = {"name":"Shekhar", "likes": "guys"}
-
Invoke method
are_schemas_same = match.are_keys_same_in_dictionary(dicOne, dicTwo)
-
Output
(True, '')
The output is a tuple with a boolean and a string. The boolean determines if the schemas match and the string is the error message (if any)