gemseo.core.namespaces module#
Utility functions and classes to handle namespaces.
The namespaces implementation itself is mainly in grammars and
discipline
- split_namespace(name)[source]#
Return the (namespace, name) pair from a data name.
For instance if data_name =
my:namespace:aand the separator is:, returns (my:namespace,``a``).If there is no namespace prefix in
data_name, returnsdata_name.In case data_name contains the namespace separator but empty name, or empty namespace, returns the (namespace, name) pair, containing eventually empty strings.
- update_namespaces(namespaces, other_namespaces)[source]#
Update namespaces with the key/value pairs from other, overwriting existing keys.
- Parameters:
namespaces (MutableMapping[str, str | list[str]]) -- The namespaces to update.
other_namespaces (MutableMapping[str, str | list[str]]) -- The namespaces to update from.
- Return type:
None