denote.translation¶
Parameter translation between normalized and native backend interfaces.
Functions
|
Create a function that translates normalized kwargs to native kwargs. |
|
Validate a single parameter against its config constraints. |
- denote.translation.make_kwargs_translator(param_map, *, on_unsupported='warn')[source]¶
Create a function that translates normalized kwargs to native kwargs.
- Parameters:
param_map (
Dict[str,Optional[dict]]) –Mapping of normalized_name -> native config dict. Each config dict can have:
’native_name’: str — the backend’s parameter name
’coerce’: callable — transform the value
’default’: Any — default value if not provided
None — parameter is not supported by this backend
on_unsupported (
str) – What to do with params not in param_map. ‘warn’ (default), ‘raise’, or ‘ignore’.
- Return type:
- Returns:
A function that translates kwargs dicts.