jina.hubble.hubio module#
Module for wrapping Jina Hub API calls.
- class jina.hubble.hubio.HubIO(args=None, **kwargs)[source]#
Bases:
object
HubIO
provides the way to interact with Jina Hub registry. You can use it with CLI to package a directory into a Jina Hub and publish it to the world. Examples:jina hub push my_executor/ to push the executor package to Jina Hub
jina hub pull UUID8 to download the executor identified by UUID8
To create a
HubIO
object, simply:- Parameters:
args (
Optional
[Namespace
]) – arguments
- static fetch_meta(name, tag, *, secret=None, image_required=True, rebuild_image=True, force=False)[source]#
Fetch the executor meta info from Jina Hub. :type name:
str
:param name: the UUID/Name of the executor :type tag:str
:param tag: the tag of the executor if available, otherwise, use None as the value :type secret:Optional
[str
] :param secret: the access secret of the executor :type image_required:bool
:param image_required: it indicates whether a Docker image is required or not :type rebuild_image:bool
:param rebuild_image: it indicates whether Jina Hub need to rebuild image or not :type force:bool
:param force: if set to True, access to fetch_meta will always pull latest Executor metas, otherwise, defaultto local cache
- Return type:
- Returns:
meta of executor
Note
The name and tag should be passed via
args
and force and secret askwargs
, otherwise, cache does not work.