In a `config_schema` , `Map` allows you to define ...
# ask-community
c
In a
config_schema
,
Map
allows you to define a
dict
with an arbitrary number of items, right? Each item will be a
String
key and a
String
value, so is this the correct way to use it:
Map(key_type=String, inner_type=String)
🤖 1
I want to take that
dict
and pass it as
**kwargs
to a function
s
Hi Charlie, yes, the way you’ve specified
Map
should work. You can also just use
str
instead of
String
. You will have no problem taking the
dict
value, it’s just a Python dict, the
Map
is just used for type-checking purposes.
c
yeah I actually think I need that or
Permissive
, turns out the item value can be a number of types
s
Permissive
seems like your best bet then.