flytekit.extend.SerializationSettings

class flytekit.extend.SerializationSettings(project, domain, version, image_config, env=None, flytekit_virtualenv_root=None, python_interpreter=None, entrypoint_settings=None, fast_serialization_settings=None)[source]

These settings are provided while serializing a workflow and task, before registration. This is required to get runtime information at serialization time, as well as some defaults.

Parameters
  • project (str) –

  • domain (str) –

  • version (str) –

  • image_config (flytekit.core.context_manager.ImageConfig) –

  • env (Optional[Dict[str, str]]) –

  • flytekit_virtualenv_root (Optional[str]) –

  • python_interpreter (Optional[str]) –

  • entrypoint_settings (Optional[flytekit.core.context_manager.EntrypointSettings]) –

  • fast_serialization_settings (Optional[flytekit.core.context_manager.FastSerializationSettings]) –

Return type

None

project

The project (if any) with which to register entities under.

Type

str

domain

The domain (if any) with which to register entities under.

Type

str

version

The version (if any) with which to register entities under.

Type

str

image_config

The image config used to define task container images.

Type

ImageConfig

env

Environment variables injected into task container definitions.

Type

Optional[Dict[str, str]]

flytekit_virtualenv_root

During out of container serialize the absolute path of the flytekit virtualenv at serialization time won’t match the in-container value at execution time. This optional value is used to provide the in-container virtualenv path

Type

Optional[str]

python_interpreter

The python executable to use. This is used for spark tasks in out of container execution.

Type

Optional[str]

entrypoint_settings

Information about the command, path and version of the entrypoint program.

Type

Optional[EntrypointSettings]

fast_serialization_settings

If the code is being serialized so that it can be fast registered (and thus omit building a Docker image) this object contains additional parameters for serialization.

Type

Optional[FastSerializationSettings]

__init__(project, domain, version, image_config, env=None, flytekit_virtualenv_root=None, python_interpreter=None, entrypoint_settings=None, fast_serialization_settings=None)
Parameters
  • project (str) –

  • domain (str) –

  • version (str) –

  • image_config (flytekit.core.context_manager.ImageConfig) –

  • env (Optional[Dict[str, str]]) –

  • flytekit_virtualenv_root (Optional[str]) –

  • python_interpreter (Optional[str]) –

  • entrypoint_settings (Optional[flytekit.core.context_manager.EntrypointSettings]) –

  • fast_serialization_settings (Optional[flytekit.core.context_manager.FastSerializationSettings]) –

Return type

None

Methods

__init__(project, domain, version, image_config)

new_builder()

Creates a SerializationSettings.Builder that copies the existing serialization settings parameters and allows for customization.

should_fast_serialize()

Whether or not the serialization settings specify that entities should be serialized for fast registration.

Attributes