core.geo.product_name
- core.geo.product_name.check(name: str, regexp: str) bool[source]
Check if name satisfies regular expression
- core.geo.product_name.decompose(name: str, regexps: list[str], sep: str = '_') dict[source]
Decompose a string according to the list of regexp, assumming that every regexp block are splitted by sep
- core.geo.product_name.get_fields(name: str, out: list = [])[source]
Returns every field name that can be change in product name
- core.geo.product_name.get_level(name: str, pattern: dict)[source]
Returns the level of a product based on its name
- core.geo.product_name.get_pattern(name: str) dict[source]
Get pattern that match product name
- Parameters:
name (str) – Product name or id
- Returns:
Dictionary containing sensor name, pattern and regular expression
- Return type:
dict
- core.geo.product_name.retrieve_product(product_id: str, fields: dict, pattern: tuple[str] = None) str[source]
Function retrieve a product base on another one. For example, retrieve Level-2 product based on Level-1
- Parameters:
product_id (str) – Product considered as base
fields (dict) – Fields to change
pattern (tuple[str], optional) – Pattern of <product_id>. Defaults to None.
- Returns:
New product id
- Return type:
str