ibm_aigov_facts_client.utils.utils module
- version()
- get_instance_guid(authenticator, env, container_type: str = None, is_cp4d: bool = False, service_url: str = None, bearer_token_flag=False)
- check_if_cp4d(service_url: str, verify: bool = True)
Returns True if the URL provided belongs to a CP4D environment. :service_url: The service URL for Watson OpenScale.
- validate_external_connection_props(props: dict)
- validate_enum(el, el_name, enum_class, mandatory=True)
- default_root_dir()
- exists(name)
- local_file_uri_to_path(uri)
Convert URI to local filesystem path.
- path_to_local_file_uri(path)
Convert local filesystem path to local file uri.
- mkdir(root, name=None)
Make directory with name “root/name”, or just “root” if name is None. :param root: Name of parent directory :param name: Optional name of leaf directory :return: Path to created directory
- is_python_2()
- validate_type(el, el_name, expected_type, mandatory=True)
- print_text_header_h1(title: str) None
- print_text_header_h2(title: str) None
- print_synchronous_run(title: str, check_state: Callable, run_states: List[str] = None, success_states: List[str] = None, failure_states: List[str] = None, delay: int = 5, get_result: Callable = None) None | dict
- install_package(package, version=None)
- install_package_from_pypi(name, version=None, test_pypi=False)
- validate_pandas_dataframe(el, el_name, mandatory)
- handle_response(expected_status_code, operationName, response, json_response=True)
- get(obj: dict, path, default=None)
Gets the deep nested value from a dictionary Arguments:
obj {dict} – Dictionary to retrieve the value from path {list|str} – List or . delimited string of path describing path.
- Keyword Arguments:
default {mixed} – default value to return if path does not exist (default: {None})
- Returns:
mixed – Value of obj at path