jina.hubble.hubapi module
Module wrapping interactions with the local executor packages.
jina.hubble.hubapi.get_dist_path(uuid, tag)[source]
Get the package path according ID and TAG :type uuid: str
:param uuid: the UUID of the executor :type tag: str
:param tag: the TAG of the executor :rtype: Tuple
[Path
, Path
] :return: package and its dist-info path
jina.hubble.hubapi.get_dist_path_of_executor(executor)[source]
Return the path of the executor if available.
Parameters
executor (HubExecutor) – the executor to check
Return type
Tuple
[Path
,Path
]Returns
the path of the executor package
jina.hubble.hubapi.get_config_path(local_id)[source]
Get the local configure file :type local_id: str
:param local_id: the random local ID of the executor :rtype: Path
:return: json config path
jina.hubble.hubapi.get_lockfile()[source]
Get the path of file locker :rtype: str
:return: the path of file locker
jina.hubble.hubapi.load_secret(work_path)[source]
Get the UUID and Secret from local
Parameters
work_path (
Path
) – the local package directoryReturn type
Tuple
[str
,str
]Returns
the UUID and secret
jina.hubble.hubapi.dump_secret(work_path, uuid8, secret)[source]
Dump the UUID and Secret into local file
Parameters
work_path (
Path
) – the local package directoryuuid8 (
str
) – the ID of the executorsecret (
str
) – the access secret
jina.hubble.hubapi.install_local(zip_package, executor, install_deps=False)[source]
Install the package in zip format to the Jina Hub root.
Parameters
zip_package (
Path
) – the path of the zip fileexecutor (HubExecutor) – the executor to install
install_deps (
bool
) – if set, install dependencies
jina.hubble.hubapi.install_package_dependencies(install_deps, pkg_dist_path, pkg_path)[source]
Parameters
install_deps (
bool
) – if set, then install dependenciespkg_dist_path (
Path
) – package distribution pathpkg_path (
Path
) – package path
Return type
None
jina.hubble.hubapi.uninstall_local(uuid)[source]
Uninstall the executor package.
Parameters
uuid (
str
) – the UUID of the executor
jina.hubble.hubapi.list_local()[source]
List the locally-available executor packages.
Returns
the list of local executors (if found)
jina.hubble.hubapi.exist_local(uuid, tag=None)[source]
Check whether the executor exists in local
Parameters
uuid (
str
) – the UUID of the executortag (
Optional
[str
]) – the TAG of the executor
Return type
bool
Returns
True if existed, else False