I'm using the schema
library.
How can I create a schema to validate if a dictionary contains anyone of the keys and corresponding values in it?
mydict_schema = Schema({
Optional('name'): str,
Optional('name_id'): int,
})
At the moment the keys are all Optional
, but I want there to be at least one of them.