0.1.203

Union SDK

The Union SDK provides the Python API for writing Union workflows. It consists of the open-source flytekit package in addition to the union package which supports additional functionality specific to Union.

Developing on Union

For developing on the Union platform you need to add the union package to your project:

$ uv add union

This will install the Union SDK, which is a superset of the Flytekit SDK. It will also install the union command-line tool.

When working with the Union SDK you will be using the union CLI and both the Flytekit SDK and the Union SDK docs.

Directory

Classes

Class Description
union.ActorEnvironment ActorEnvironment class.
union.Artifact This is a wrapper around the Flytekit Artifact class.
union.Cache Cache configuration for a task.
union.ContainerTask This is an intermediate class that represents Flyte Tasks that run a container at execution time.
union.Deck Deck enable users to get customizable and default visibility into their tasks.
union.FlyteDirectory
union.FlyteFile
union.ImageSpec This class is used to specify the docker image that will be used to run the task.
union.LaunchPlan Launch Plans are one of the core constructs of Flyte.
union.PodTemplate Custom PodTemplate specification for a Task.
union.Resources This class is used to specify both resource requests and resource limits.
union.Secret See cookbook:secrets for usage examples.
union.StructuredDataset This is the user facing StructuredDataset class.
union.UnionRemote
union.VersionParameters Parameters used for version hash generation.
union.actor.ActorEnvironment ActorEnvironment class.
union.actor.ActorTask
union.app.App App specification.
union.app.ArizeConfig
union.app.FlyteConnectorApp FlyteConnector application specification that inherits from App.
union.app.Input Input for application.
union.app.Link
union.app.PhoenixConfig
union.app.ScalingMetric
union.app.URLQuery
union.app.WeaveConfig
union.app.llm.SGLangApp App backed by FastAPI.
union.app.llm.VLLMApp App backed by FastAPI.
union.artifacts.Artifact This is a wrapper around the Flytekit Artifact class.
union.artifacts.DataCard
union.artifacts.ModelCard
union.artifacts.OnArtifact Event used to link upstream and downstream workflows together.
union.cache.CacheFunctionBody A class that implements a versioning mechanism for functions by generating.
union.configuration.UnionAIPlugin
union.filesystems.AsyncUnionFS
union.filesystems.AsyncUnionMetaFS
union.remote.HuggingFaceModelInfo Captures information about a Hugging Face model.
union.remote.ShardConfig
union.remote.UnionRemote
union.remote.VLLMShardArgs
union.ucimage.UCImageSpecBuilder ImageSpec builder for UnionAI.

Protocols

Protocol Description
union.CachePolicy

Functions

Function Description
union.actor_cache() Cache function between actor executions.
union.current_context() Use this method to get a handle of specific parameters available in a flyte task.
union.map() Use to map over tasks, actors, launch plans, reference tasks and launch plans, and remote tasks and.
union.map_task() Wrapper that creates a map task utilizing either the existing ArrayNodeMapTask.
union.task() This is the core decorator to use for any task type in flytekit.
union.workflow() This decorator declares a function to be a Flyte workflow.
union.actor.actor_cache() Cache function between actor executions.
union.map.map() Use to map over tasks, actors, launch plans, reference tasks and launch plans, and remote tasks and.

Packages

Package Description
union
union.actor
union.app
union.app.llm
union.artifacts
union.cache
union.configuration
union.filesystems Module for fsspec implementations.
union.map
union.remote
union.ucimage