cdm.lib.mappings.mappings_hdlr
¶
Created on Thu Apr 11 13:45:38 2019
Module to handle data models mappers or imodel’s use to map meteorological variables to the C3S Climate Data Store Common Data Model (CMD) tables. This module handles all mappers contained inside the tool
@author: iregon
Module Contents¶
Classes¶
Gets items from nested dictionaries. |
Functions¶
Finds the depth of a python dictionary |
|
NEEDS DOCUMENTING |
|
|
NEEDS DOCUMENTING |
|
NEEDS DOCUMENTING |
|
NEEDS DOCUMENTING |
Attributes¶
-
class
smart_dict
(*args, **kwargs)[source]¶ Bases:
dict
Gets items from nested dictionaries.
- Parameters
dict (python dictionary.) –
For simple dictionaries:
smart_dict(dict)[key]
For nested dictionaries up to n levels
- First level: can declare key as single element or in list
e.g.
smart_dict(dict)[[key]]
,smart_dict(dict)[key]
- Successive levels: keys in list from outer to inner, up to desired level
e.g.
smart_dict(dict)[[key1, key2,key3]]
,smart_dict(dict)[[key1, key2,key3,..keyn]]
- Returns
None
- Return type
if key or combination not found
-
get_functions_module_path
(imodel, log_level='INFO')[source]¶ NEEDS DOCUMENTING
- Parameters
imodel –
log_level –
- Returns
logger.error
imodel_functions