Add your description here
Project description
Flyte 2 SDK
Reliably orchestrate ML pipelines, models, and agents at scale — in pure Python.
Install
pip install flyte
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}")
| Python | Flyte 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)
| Python | Flyte CLI |
python serving.py
|
flyte serve serving.py env
|
Local Development Experience
Install the TUI for a rich local development experience:
pip install flyte[tui]
Learn More
- Live Demo — Try Flyte 2 in your browser
- Documentation — Get started running locally
- SDK Reference — API reference docs
- CLI Reference — CLI docs
- Join the Flyte 2 Production Preview — Get early access
- Features — Async parallelism, app serving, tracing, and more
- Examples — Ready-to-run examples for every feature
- Contributing — Set up a dev environment and contribute
- Slack | GitHub Discussions | Issues
License
Apache 2.0 — see LICENSE.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
flyte-2.1.0-py3-none-any.whl
(613.8 kB
view details)
File details
Details for the file flyte-2.1.0-py3-none-any.whl.
File metadata
- Download URL: flyte-2.1.0-py3-none-any.whl
- Upload date:
- Size: 613.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b188ceecc8e1d844541169599a95a28fc9bb6a35886eaffaf12da65e5c18ef8f
|
|
| MD5 |
90f2c7609f627ec82b2733d0b47494ac
|
|
| BLAKE2b-256 |
d029bce9a1c3bbd72b4d2fececddd6d071b675b0801c70d04acb1bafed6eed1f
|