flytekit.configuration.Image#

class flytekit.configuration.Image(name, fqn, tag)[source]#

Image is a structured wrapper for task container images used in object serialization.

Parameters
Return type

None

name#

A user-provided name to identify this image.

Type

str

fqn#

Fully qualified image name. This consists of #. a registry location #. a username #. a repository name For example: hostname/username/reponame

Type

str

tag#

Optional tag used to specify which version of an image to pull

Type

str

Methods

classmethod from_dict(kvs, *, infer_missing=False)#
Parameters

kvs (Optional[Union[dict, list, str, int, float, bool]]) –

Return type

dataclasses_json.api.A

classmethod from_json(s, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw)#
Parameters

s (Union[str, bytes, bytearray]) –

Return type

dataclasses_json.api.A

static look_up_image_info(name, tag, optional_tag=False)[source]#
Looks up the image tag from environment variable (should be set from the Dockerfile).

FLYTE_INTERNAL_IMAGE should be the environment variable.

This function is used when registering tasks/workflows with Admin. When using the canonical Python-based development cycle, the version that is used to register workflows and tasks with Admin should be the version of the image itself, which should ideally be something unique like the git revision SHA1 of the latest commit.

Parameters
  • optional_tag (bool) –

  • name (str) –

  • tag (Text) – e.g. somedocker.com/myimage:someversion123

Return type

Text

classmethod schema(*, infer_missing=False, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)#
Parameters
  • infer_missing (bool) –

  • many (bool) –

  • partial (bool) –

Return type

dataclasses_json.mm.SchemaF[dataclasses_json.mm.A]

to_dict(encode_json=False)#
Return type

Dict[str, Optional[Union[dict, list, str, int, float, bool]]]

to_json(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, indent=None, separators=None, default=None, sort_keys=False, **kw)#
Parameters
Return type

str

Attributes

dataclass_json_config = None
full

” Return the full image name with tag.

name: str
fqn: str
tag: str