Skip to main content

Union SDK - Proprietary extensions for Flyte

Project description

Union SDK v2

Proprietary extensions and features for Flyte, providing Union-specific functionality.

Installation

uv pip install union flyte

For development:

uv pip install -e .

Features

API Key Management

Create and manage API keys for headless authentication with Union.

Create an API Key

flyte create api-key admin --name my-api-key

This will create OAuth application credentials and output an API key that can be used for headless authentication.

Example output:

Client ID: serverless-1-myorg-my-api-key
The following API key will only be shown once. Be sure to keep it safe!
Configure your headless CLI by setting the following environment variable:

export UNION_API_KEY="<base64-encoded-credentials>"

Using the API Key

Set the generated API key as an environment variable:

export UNION_API_KEY="<your-api-key>"

Then use the Flyte CLI as normal - it will authenticate using the API key instead of prompting for interactive login.

Architecture

The Union SDK is structured as follows:

  • flyteplugins/union/internal/ - Proprietary protobuf definitions and generated code
  • flyteplugins/union/cli/ - CLI command plugins that extend the Flyte CLI
  • flyteplugins/union/utils/ - Shared utility functions
  • flyteplugins/union/remote/ - Union-specific remote objects

Plugin System

The SDK registers CLI plugins via entry points in pyproject.toml:

[project.entry-points."flyte.plugins.cli.commands"]
"create.api-key" = "flyteplugins.union.cli.api_key:create_api_key"
"delete.api-key" = "flyteplugins.union.cli.api_key:delete_api_key"
"get.api-key" = "flyteplugins.union.cli.api_key:get_api_key"

This makes Union commands available seamlessly through the Flyte CLI.

Dependencies

  • flyte>=2.0.0b26 - The Flyte SDK v2
  • rich-click>=1.8.0 - For CLI formatting

Development

To add a new CLI plugin:

  1. Create a new file in src/flyteplugins/union/cli/
  2. Define your click commands
  3. Register the entry point in pyproject.toml
  4. Shared resources (protobufs, utilities) are available in flyteplugins.union.internal.* and flyteplugins.union.utils.*

Iterating

Commands to rebuild and reinstall this plugin (into the flyte-sdk venv presumably). From this folder:

python -m build --wheel

From your flyte-sdk venv:

uv pip install --prerelease=allow --force-reinstall --no-deps --no-index --find-links /Users/ytong/go/src/github.com/unionai/flyteplugins-union/dist flyteplugins-union

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flyteplugins_union-0.1.0a0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file flyteplugins_union-0.1.0a0-py3-none-any.whl.

File metadata

File hashes

Hashes for flyteplugins_union-0.1.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 7232344fb1f781a20e470dd43234befc3969d75159a3c3802f469a67cbf5eec2
MD5 79aca6591a9d09c0fc4f406098f5e39c
BLAKE2b-256 9176f2fba1c1b4b05660da658359763f8944259c6904cfd72f511248169f9b8e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page