Submodules# module# module#

Service to register workflows. str, disable_auto_version: bool = False, remote: bool = False, skip_confirmation: bool = False)[source]#

Registers a workflow, defined as python code, with Latch.

Kicks off a three-legged OAuth2.0 flow outlined in RFC6749. Logic scaffolding this flow and detailed documentation can be found in the latch.auth package

From a high-level, the user will be redirected to a browser and prompted to login. The SDK meanwhile spins up a callback server on a separate thread that will be hit when the browser login is successful with an access token.

The major constituent steps are:

  • Constructing a Docker image

  • Serializing flyte objects within an instantiated container

  • Uploading the container with a latch-owned registry

  • Registering serialized objects + the container with latch.

The Docker image is constructed by inferring relevant files + dependencies from the workflow package code itself. If a Dockerfile is provided explicitly, it will be used for image construction instead.

The registration flow makes heavy use of Flyte, and while the Latch SDK modifies many components to play nicely with Latch, eg. platform API, user-specific auth, the underlying concepts are nicely summarized in the flytekit documentation.


pkg_root – A valid path pointing to the worklow code a user wishes to register. The path can be absolute or relative. The path is always a directory, with its structure exactly as constructed and described in the function.


>>> register("./example_workflow") module#

Utilites for registration.

Module contents#