MCPcopy
hub / github.com/flyteorg/flyte

github.com/flyteorg/flyte @v2.0.27 sqlite

repository ↗ · DeepWiki ↗ · release v2.0.27 ↗
27,897 symbols 66,005 edges 1,235 files 13,854 documented · 50%
README

[!IMPORTANT]

Flyte 2 Devbox is now available!

Check out the guide here to get started.

Looking for Flyte 1? Go to the master branch, where Flyte 1 is now maintained.


Flyte 2

Reliably orchestrate ML pipelines, models, and agents at scale — in pure Python.

Version Python License Try in Browser Docs SDK Reference CLI Reference

Flyte is a Graduated project of the LF AI & Data Foundation.

Flyte and LF AI & Data Logo

Install

uv pip install flyte

For the full SDK and development tools, see the flyte-sdk repository.

Example

import asyncio
import flyte

env = flyte.TaskEnvironment(
    name="hello_world",
    image=flyte.Image.from_debian_base(python_version=(3, 12)),
)

@env.task
def calculate(x: int) -> int:
    return x * 2 + 5

@env.task
async def main(numbers: list[int]) -> float:
    results = await asyncio.gather(*[
        calculate.aio(num) for num in numbers
    ])
    return sum(results) / len(results)

if __name__ == "__main__":
    flyte.init()
    run = flyte.run(main, numbers=list(range(10)))
    print(f"Result: {run.result}")
PythonFlyte CLI
python hello.py
flyte run hello.py main --numbers '[1,2,3]'

Serve a Model

# serving.py
from fastapi import FastAPI
import flyte
from flyte.app.extras import FastAPIAppEnvironment

app = FastAPI()
env = FastAPIAppEnvironment(
    name="my-model",
    app=app,
    image=flyte.Image.from_debian_base(python_version=(3, 12)).with_pip_packages(
        "fastapi", "uvicorn"
    ),
)

@app.get("/predict")
async def predict(x: float) -> dict:
    return {"result": x * 2 + 5}

if __name__ == "__main__":
    flyte.init_from_config()
    flyte.serve(env)
PythonFlyte CLI
python serving.py
flyte serve serving.py env

Local Development Experience

Install the TUI for a rich local development experience:

uv pip install flyte[tui]

Watch the local development experience

Try the hosted demo in your browser — no installation required.

Open Source Backend

The open source backend for Flyte 2 is coming soon. This repository will contain the Kubernetes-native backend infrastructure for deploying Flyte 2 as a distributed, multi-node service. See the Backend README for the current state of the backend, protocol buffer definitions, and contribution guide.

If you need an enterprise-ready, production-grade backend for Flyte 2 today, it is available on Union.ai.

Learn More

Contributing

We welcome contributions! See the Backend README for backend development, or join us on slack.flyte.org.

Sponsors

CI container image builds for this repository are sponsored by Depot — fast, native multi-arch Docker builds with persistent layer caching.

Built with Depot

License

Apache 2.0 — see LICENSE.

Extension points exported contracts — how you extend this code

GarbageCollectable (Interface)
GarbageCollectable is an interface plugins implement to provide an external garbage collector information. [16 implementers]
flyteplugins/go/tasks/pluginmachinery/k8s/plugin.go
ActionsServiceClient (Interface)
ActionsServiceClient is a client for the flyteidl2.actions.ActionsService service. [15 implementers]
gen/go/flyteidl2/actions/actionsconnect/actions_service.connect.go
AppLogStreamer (Interface)
AppLogStreamer streams pod logs for an app replica. [32 implementers]
app/internal/service/app_logs_service.go
AutoRefresh (Interface)
AutoRefresh with regular GetOrCreate and Delete along with background asynchronous refresh. Caller provides callbacks fo [14 …
flytestdlib/cache/auto_refresh.go
AutoRefreshCache (Interface)
AutoRefreshCache with regular GetOrCreate and Delete along with background asynchronous refresh. Caller provides callbac [15 …
flytestdlib/utils/auto_refresh_cache.go
Metadata (Interface)
Metadata is a placeholder for data reference metadata. [7 implementers]
flytestdlib/storage/storage.go
Timer (Interface)
Defines a common interface for timers. [8 implementers]
flytestdlib/ioutils/timed_readers.go
Timer (Interface)
Defines a common interface for timers. [8 implementers]
flytestdlib/promutils/labeled/timer_wrapper.go

Core symbols most depended-on inside this repo

Equal
called by 2182
flytestdlib/sets/generic_set.go
Validate
called by 1752
cache_service/service/service.go
Get
called by 1506
flytestdlib/futures/future.go
Error
called by 1417
flytestdlib/app/error.go
Errorf
called by 1256
flytestdlib/logger/logger.go
Return
called by 933
flyteplugins/go/tasks/pluginmachinery/core/mocks/mocks.go
Run
called by 610
flyteplugins/go/tasks/pluginmachinery/core/mocks/mocks.go
Run
called by 366
flytestdlib/app/app.go

Shape

Method 19,731
Struct 3,423
Function 3,379
TypeAlias 691
Interface 359
Class 225
Enum 68
FuncType 21

Languages

Go96%
Python4%
TypeScript1%

Modules by API surface

gen/go/flyteidl2/workflow/run_service.pb.validate.go598 symbols
gen/go/flyteidl2/workflow/run_service.pb.go500 symbols
gen/go/flyteidl2/workflow/workflowconnect/mocks/mocks.go476 symbols
flytestdlib/gen/go/flyteidl2/workflow/workflowconnect/mocks/mocks.go476 symbols
flytestdlib/flyteplugins/go/tasks/pluginmachinery/core/mocks/mocks.go444 symbols
flyteplugins/go/tasks/pluginmachinery/core/mocks/mocks.go444 symbols
gen/go/flyteidl2/workflow/run_definition.pb.go357 symbols
gen/go/flyteidl2/workflow/run_definition.pb.validate.go338 symbols
gen/go/flyteidl2/app/app_definition.pb.validate.go325 symbols
runs/repository/mocks/mocks.go310 symbols
flytestdlib/runs/repository/mocks/mocks.go310 symbols
gen/go/flyteidl2/core/literals.pb.validate.go299 symbols

Dependencies from manifests, versioned

4d63.com/gocheckcompilerdirectivesv1.3.0 · 1×
4d63.com/gochecknoglobalsv0.2.2 · 1×
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/gov1.36.11-20260415201 · 1×
cel.dev/exprv0.25.1 · 1×
charm.land/lipgloss/v2v2.0.3 · 1×
cloud.google.com/gov0.121.6 · 1×
cloud.google.com/go/authv0.20.0 · 1×
cloud.google.com/go/auth/oauth2adaptv0.2.8 · 1×
cloud.google.com/go/compute/metadatav0.9.0 · 1×
cloud.google.com/go/monitoringv1.24.3 · 1×
cloud.google.com/go/secretmanagerv1.16.0 · 1×

For agents

$ claude mcp add flyte \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact