Wait for the result
task.remote(...) or await task.remote.aio(...) returns the Task result.
Private beta — accepting applications
Declare Python Tasks inside an App, submit an Invocation, and receive the result in the same program. Yak handles packaging, authenticated submission, scheduling, execution and logs.
Yak is currently invite-only. The documentation and CLI are public, but downloading the CLI does not grant platform access. Only invited and authorized users can execute workloads. A request records your interest; it does not create an account or grant access. We'll contact applicants when access is available.
import asyncio
import yak
app = yak.App(name="hello-task", image="python:3.11")
@app.task()
def square(value: int) -> int:
return value * value
@app.entrypoint()
async def main() -> None:
result = await square.remote.aio(21)
print(f"square(21) = {result}")
if __name__ == "__main__":
asyncio.run(main())
$ yak run hello_task.pysquare(21) = 441
The printed line is the quickstart App’s result. No transient CLI progress is assumed.
Authenticate with yak init, then run the quickstart from a terminal.
Running workloads requires private beta access. Request an invitation before following the quickstart.
curl -fsSL \
https://github.com/yak-computer/yak-releases/releases/download/v0.1.19/install.sh \
| sh
yak --version
yak init
An App groups declarations. A Task wraps a Python callable. Each remote call creates an Invocation with its own result, status, cancellation control and settled usage.
task.remote(...) or await task.remote.aio(...) returns the Task result.
await task.remote_async(...) returns an Invocation you can observe, cancel, and await later.
Task.map lazily fans out a bounded number of Invocations and closes outstanding work when stopped.
A Live App is a persistent App with Versions and Endpoints. yak deploy publishes its lifecycle; yak serve opens a session-bound development endpoint.
one App
import asyncio
import yak
app = yak.App(name="hello-live-app")
@app.task()
@yak.web_endpoint(method="GET", path="/hello")
def hello(request: yak.Request) -> yak.Response:
name = request.query_params.get("name", "Yak")
return yak.Response(
body={"message": f"hello from {name}", "path": request.path},
status=200,
)
@app.task()
@yak.web_endpoint(method="POST", path="/echo")
def echo(request: yak.Request) -> yak.Response:
payload = request.json
return yak.Response(
body={"received": payload},
status=200,
)
@app.entrypoint()
async def main() -> None:
await app.serve()
if __name__ == "__main__":
asyncio.run(main())
Use a supported Python image, a registry image, or Yak’s fluent Image builder for packages and the supported Dockerfile subset. Configure resource requests and limits on the Task.
Pin a registry base or declare Python packages, environment variables and build commands in an Image.
Image guideTask CPU is measured in core units; memory is in MiB. Requests guide admission and capacity, while an explicit limit bounds execution.
Task configurationUse the storage layer that matches where the data lives and how long it must last.
Yak-managed / durable
Keep files across Invocations. Stage small client-side edits with open and publish, or stream files with upload and download.
External / mounted
Read or write an existing S3-compatible bucket or prefix inside one Task Invocation. The bucket stays in your object store.
Object Storage MountsInvocation-local / disposable
Give one Invocation a bounded scratch filesystem. Its contents disappear when that Invocation ends.
Ephemeral DisksKeep secret values out of source, inspect Invocation state and logs, and distinguish a user-code failure from a transport or setup failure.
Use inline values for a single remote run or named Secrets for reusable configuration. Management output does not reveal stored values.
SecretsInvocation usage reports backend-settled resource observations in their documented units. It is not a price estimate.
Usage and troubleshootingYak is currently invite-only. Read the docs or install the CLI while you wait; platform access requires an invitation. We'll contact applicants when a spot is available.
Request Beta Access