uv
Build, audit, and package uv-managed Python projects and workspaces.
Installation
dagger install github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08eEntrypoint
Return Type
Uv !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | Source directory. |
Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
func (m *MyModule) Example() *dagger.Uv {
return dag.
Uv()
}@function
def example() -> dagger.Uv:
return (
dag.uv()
)@func()
example(): Uv {
return dag
.uv()
}Types
Audit 🔗
Runs uv audit for a single workspace in a given uv image.
uvLock() 🔗
The workspace’s uv.lock file.
Return Type
File ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
audit \
uv-lockfunc (m *MyModule) Example(path string) *dagger.File {
return dag.
Uv().
Workspace(path).
Audit().
UvLock()
}@function
def example(path: str) -> dagger.File:
return (
dag.uv()
.workspace(path)
.audit()
.uv_lock()
)@func()
example(path: string): File {
return dag
.uv()
.workspace(path)
.audit()
.uvLock()
}pyproject() 🔗
The workspace’s pyproject.toml file.
Return Type
File ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
audit \
pyprojectfunc (m *MyModule) Example(path string) *dagger.File {
return dag.
Uv().
Workspace(path).
Audit().
Pyproject()
}@function
def example(path: str) -> dagger.File:
return (
dag.uv()
.workspace(path)
.audit()
.pyproject()
)@func()
example(path: string): File {
return dag
.uv()
.workspace(path)
.audit()
.pyproject()
}image() 🔗
uv image reference to run the audit in (must provide a
uvbinary).
Return Type
String ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
audit \
imagefunc (m *MyModule) Example(ctx context.Context, path string) string {
return dag.
Uv().
Workspace(path).
Audit().
Image(ctx)
}@function
async def example(path: str) -> str:
return await (
dag.uv()
.workspace(path)
.audit()
.image()
)@func()
async example(path: string): Promise<string> {
return dag
.uv()
.workspace(path)
.audit()
.image()
}uvToml() 🔗
The workspace’s uv.toml configuration file, if present.
Return Type
File Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
audit \
uv-tomlfunc (m *MyModule) Example(path string) *dagger.File {
return dag.
Uv().
Workspace(path).
Audit().
UvToml()
}@function
def example(path: str) -> dagger.File:
return (
dag.uv()
.workspace(path)
.audit()
.uv_toml()
)@func()
example(path: string): File {
return dag
.uv()
.workspace(path)
.audit()
.uvToml()
}run() 🔗
Run uv audit --frozen for this workspace.
Audits straight from the committed uv.lock without re-resolving against
package indexes (--frozen); vulnerability data comes from the public
OSV service, so no index credentials are required. A failing audit
(non-zero exit, e.g. vulnerabilities found) raises dagger.ExecError,
whose stdout/stderr carry uv’s report; the runner folds that into
the trace error (see Uv.audit).
Return Type
Void ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
audit \
runfunc (m *MyModule) Example(ctx context.Context, path string) {
return dag.
Uv().
Workspace(path).
Audit().
Run(ctx)
}@function
async def example(path: str) -> None:
return await (
dag.uv()
.workspace(path)
.audit()
.run()
)@func()
async example(path: string): Promise<void> {
return dag
.uv()
.workspace(path)
.audit()
.run()
}LocalPackage 🔗
A local (editable/directory) package in a uv workspace.
name() 🔗
Package name
Return Type
String ! Example
Function UvLocalPackage.name is not accessible from the uv moduleFunction UvLocalPackage.name is not accessible from the uv moduleFunction UvLocalPackage.name is not accessible from the uv moduleFunction UvLocalPackage.name is not accessible from the uv modulepath() 🔗
Workspace-relative path
Return Type
String ! Example
Function UvLocalPackage.path is not accessible from the uv moduleFunction UvLocalPackage.path is not accessible from the uv moduleFunction UvLocalPackage.path is not accessible from the uv moduleFunction UvLocalPackage.path is not accessible from the uv modulemodule() 🔗
Python module name
Return Type
String ! Example
Function UvLocalPackage.module is not accessible from the uv moduleFunction UvLocalPackage.module is not accessible from the uv moduleFunction UvLocalPackage.module is not accessible from the uv moduleFunction UvLocalPackage.module is not accessible from the uv moduleflat() 🔗
Flat layout (module at package root) vs src layout (module under src/)
Return Type
Boolean ! Example
Function UvLocalPackage.flat is not accessible from the uv moduleFunction UvLocalPackage.flat is not accessible from the uv moduleFunction UvLocalPackage.flat is not accessible from the uv moduleFunction UvLocalPackage.flat is not accessible from the uv moduleSyncPlan 🔗
Resolved build configuration for a uv workspace sync.
wsDir() 🔗
Resolved workspace directory (with codegen overlay if applicable)
Return Type
Directory ! Example
Function UvSyncPlan.wsDir is not accessible from the uv moduleFunction UvSyncPlan.wsDir is not accessible from the uv moduleFunction UvSyncPlan.wsDir is not accessible from the uv moduleFunction UvSyncPlan.wsDir is not accessible from the uv moduleallLocal() 🔗
Every local package in the workspace (sorted by name)
Return Type
[LocalPackage ! ] ! Example
Function UvSyncPlan.allLocal is not accessible from the uv moduleFunction UvSyncPlan.allLocal is not accessible from the uv moduleFunction UvSyncPlan.allLocal is not accessible from the uv moduleFunction UvSyncPlan.allLocal is not accessible from the uv moduleneededLocal() 🔗
Local packages the target transitively depends on (sorted by name)
Return Type
[LocalPackage ! ] ! Example
Function UvSyncPlan.neededLocal is not accessible from the uv moduleFunction UvSyncPlan.neededLocal is not accessible from the uv moduleFunction UvSyncPlan.neededLocal is not accessible from the uv moduleFunction UvSyncPlan.neededLocal is not accessible from the uv moduleflatPackages() 🔗
Local packages with no build-system (virtual/deps-only: pyproject scaffolded, source skipped)
Return Type
[String ! ] ! Example
Function UvSyncPlan.flatPackages is not accessible from the uv moduleFunction UvSyncPlan.flatPackages is not accessible from the uv moduleFunction UvSyncPlan.flatPackages is not accessible from the uv moduleFunction UvSyncPlan.flatPackages is not accessible from the uv moduleuvSyncArgs() 🔗
Precomputed uv sync argv
Return Type
[String ! ] ! Example
Function UvSyncPlan.uvSyncArgs is not accessible from the uv moduleFunction UvSyncPlan.uvSyncArgs is not accessible from the uv moduleFunction UvSyncPlan.uvSyncArgs is not accessible from the uv moduleFunction UvSyncPlan.uvSyncArgs is not accessible from the uv modulenoEditable() 🔗
Local packages installed non-editable (source baked into site-packages, not path-linked)
Return Type
Boolean ! Example
Function UvSyncPlan.noEditable is not accessible from the uv moduleFunction UvSyncPlan.noEditable is not accessible from the uv moduleFunction UvSyncPlan.noEditable is not accessible from the uv moduleFunction UvSyncPlan.noEditable is not accessible from the uv moduleVenv 🔗
A relocatable uv virtual environment bundled with the uv-managed Python it needs.
A venv never contains the standard library — .venv/bin/python resolves to
a base interpreter whose lib/ provides it. This pairs the venv with that
interpreter so the two can be dropped into a fresh container (one without any
Python of its own) and run without uv.
Only valid for a venv created with with_venv(relocatable=True) against a
uv-managed (standalone) Python: uv’s standalone Pythons are themselves
relocatable, and a relocatable venv keeps working when its directory is moved.
The venv may be mounted at any path, but the Python must be remounted at
python_path (the absolute location its pyvenv.cfg records).
The bundled Python is the python-build-standalone variant uv selected for the
base image’s platform/libc (set by base_container at build time), so the
target container must match it: a Debian (glibc) base exports to glibc targets,
an Alpine (musl) base to musl/alpine targets.
venv() 🔗
The relocatable
.venvdirectory.
Return Type
Directory ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
venv --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean --no-editable boolean --auto-install-uv boolean \
venvfunc (m *MyModule) Example(path string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, noEditable bool, autoInstallUv bool) *dagger.Directory {
return dag.
Uv().
Workspace(path).
Venv(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv).
Venv()
}@function
def example(path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, no_editable: bool, auto_install_uv: bool) -> dagger.Directory:
return (
dag.uv()
.workspace(path)
.venv(all_extras, all_groups, all_packages, dagger_codegen, no_editable, auto_install_uv)
.venv()
)@func()
example(path: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, noEditable: boolean, autoInstallUv: boolean): Directory {
return dag
.uv()
.workspace(path)
.venv(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
.venv()
}python() 🔗
uv’s managed-Python store (the interpreter the venv links against, plus uv’s version symlinks).
Return Type
Directory ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
venv --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean --no-editable boolean --auto-install-uv boolean \
pythonfunc (m *MyModule) Example(path string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, noEditable bool, autoInstallUv bool) *dagger.Directory {
return dag.
Uv().
Workspace(path).
Venv(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv).
Python()
}@function
def example(path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, no_editable: bool, auto_install_uv: bool) -> dagger.Directory:
return (
dag.uv()
.workspace(path)
.venv(all_extras, all_groups, all_packages, dagger_codegen, no_editable, auto_install_uv)
.python()
)@func()
example(path: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, noEditable: boolean, autoInstallUv: boolean): Directory {
return dag
.uv()
.workspace(path)
.venv(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
.python()
}pythonPath() 🔗
Absolute path the Python store must be mounted at for the venv to resolve its interpreter.
Return Type
String ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
venv --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean --no-editable boolean --auto-install-uv boolean \
python-pathfunc (m *MyModule) Example(ctx context.Context, path string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, noEditable bool, autoInstallUv bool) string {
return dag.
Uv().
Workspace(path).
Venv(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv).
PythonPath(ctx)
}@function
async def example(path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, no_editable: bool, auto_install_uv: bool) -> str:
return await (
dag.uv()
.workspace(path)
.venv(all_extras, all_groups, all_packages, dagger_codegen, no_editable, auto_install_uv)
.python_path()
)@func()
async example(path: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, noEditable: boolean, autoInstallUv: boolean): Promise<string> {
return dag
.uv()
.workspace(path)
.venv(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
.pythonPath()
}into() 🔗
Mount the venv (at path) and its Python (at python_path) into container.
With set_env_vars, exports VIRTUAL_ENV and prepends the venv’s bin/
to PATH so python/console scripts resolve without activation;
otherwise the venv is just mounted (run it via <path>/bin/python).
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| container | Container ! | - | Container to add the venv and its Python to. |
| path | String ! | ".venv" | Where to mount the venv; relative paths resolve against the container’s workdir. Defaults to |
| setEnvVars | Boolean ! | false | Also set the standard activation env vars ( |
Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
venv --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean --no-editable boolean --auto-install-uv boolean \
into --container IMAGE:TAG --path string --set-env-vars booleanfunc (m *MyModule) Example(path string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, noEditable bool, autoInstallUv bool, container *dagger.Container, path1 string, setEnvVars bool) *dagger.Container {
return dag.
Uv().
Workspace(path).
Venv(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv).
Into(container, path1, setEnvVars)
}@function
def example(path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, no_editable: bool, auto_install_uv: bool, container: dagger.Container, path1: str, set_env_vars: bool) -> dagger.Container:
return (
dag.uv()
.workspace(path)
.venv(all_extras, all_groups, all_packages, dagger_codegen, no_editable, auto_install_uv)
.into(container, path1, set_env_vars)
)@func()
example(path: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, noEditable: boolean, autoInstallUv: boolean, container: Container, path1: string, setEnvVars: boolean): Container {
return dag
.uv()
.workspace(path)
.venv(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
.into(container, path1, setEnvVars)
}WorkspaceBuild 🔗
An in-progress workspace build: a container plus its resolved sync plan.
Drives the install pipeline: with_remote_dependencies to install remote
deps, with_workspace_files to scaffold local packages, then
with_local_dependencies to install them.
container() 🔗
Container carrying the workspace’s pyproject.toml and uv.lock
Return Type
Container ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
build --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean --no-editable boolean --auto-install-uv boolean \
containerfunc (m *MyModule) Example(path string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, noEditable bool, autoInstallUv bool) *dagger.Container {
return dag.
Uv().
Workspace(path).
Build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv).
Container()
}@function
def example(path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, no_editable: bool, auto_install_uv: bool) -> dagger.Container:
return (
dag.uv()
.workspace(path)
.build(all_extras, all_groups, all_packages, dagger_codegen, no_editable, auto_install_uv)
.container()
)@func()
example(path: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, noEditable: boolean, autoInstallUv: boolean): Container {
return dag
.uv()
.workspace(path)
.build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
.container()
}plan() 🔗
Build configuration carried through the pipeline
Return Type
SyncPlan ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
build --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean --no-editable boolean --auto-install-uv boolean \
planfunc (m *MyModule) Example(path string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, noEditable bool, autoInstallUv bool) *dagger.UvSyncPlan {
return dag.
Uv().
Workspace(path).
Build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv).
Plan()
}@function
def example(path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, no_editable: bool, auto_install_uv: bool) -> dagger.UvSyncPlan:
return (
dag.uv()
.workspace(path)
.build(all_extras, all_groups, all_packages, dagger_codegen, no_editable, auto_install_uv)
.plan()
)@func()
example(path: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, noEditable: boolean, autoInstallUv: boolean): UvSyncPlan {
return dag
.uv()
.workspace(path)
.build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
.plan()
}copyVenv() 🔗
Copy this build’s venv (and the uv-managed Python it needs) into container.
Convenience over venv().into(...): mounts the relocatable venv at path
and its Python at the absolute path the venv expects, yielding a container
that can run the environment without uv. Same constraints as venv.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| container | Container ! | - | Container to copy the venv and its Python into. |
| path | String ! | ".venv" | Where to mount the venv; relative paths resolve against the container’s workdir. Defaults to |
| setEnvVars | Boolean ! | false | Also set the standard activation env vars ( |
Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
build --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean --no-editable boolean --auto-install-uv boolean \
copy-venv --container IMAGE:TAG --path string --set-env-vars booleanfunc (m *MyModule) Example(path string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, noEditable bool, autoInstallUv bool, container *dagger.Container, path1 string, setEnvVars bool) *dagger.Container {
return dag.
Uv().
Workspace(path).
Build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv).
CopyVenv(container, path1, setEnvVars)
}@function
def example(path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, no_editable: bool, auto_install_uv: bool, container: dagger.Container, path1: str, set_env_vars: bool) -> dagger.Container:
return (
dag.uv()
.workspace(path)
.build(all_extras, all_groups, all_packages, dagger_codegen, no_editable, auto_install_uv)
.copy_venv(container, path1, set_env_vars)
)@func()
example(path: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, noEditable: boolean, autoInstallUv: boolean, container: Container, path1: string, setEnvVars: boolean): Container {
return dag
.uv()
.workspace(path)
.build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
.copyVenv(container, path1, setEnvVars)
}venv() 🔗
Export this build’s virtual environment together with the Python it needs.
Bundles the venv and the exact interpreter it links against into a
UvVenv (see UvVenv.create). Call after the venv is populated (e.g.
after with_remote_dependencies/with_local_dependencies). Requires a
relocatable venv built against a uv-managed Python; raises otherwise.
Return Type
Venv ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
build --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean --no-editable boolean --auto-install-uv boolean \
venvfunc (m *MyModule) Example(path string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, noEditable bool, autoInstallUv bool) *dagger.UvVenv {
return dag.
Uv().
Workspace(path).
Build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv).
Venv()
}@function
def example(path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, no_editable: bool, auto_install_uv: bool) -> dagger.UvVenv:
return (
dag.uv()
.workspace(path)
.build(all_extras, all_groups, all_packages, dagger_codegen, no_editable, auto_install_uv)
.venv()
)@func()
example(path: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, noEditable: boolean, autoInstallUv: boolean): UvVenv {
return dag
.uv()
.workspace(path)
.build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
.venv()
}withAllWorkspaceMembers() 🔗
Like with_workspace_files but scaffolds every local package, not just transitive deps.
Return Type
WorkspaceBuild ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
build --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean --no-editable boolean --auto-install-uv boolean \
with-all-workspace-membersfunc (m *MyModule) Example(path string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, noEditable bool, autoInstallUv bool) *dagger.UvWorkspaceBuild {
return dag.
Uv().
Workspace(path).
Build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv).
WithAllWorkspaceMembers()
}@function
def example(path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, no_editable: bool, auto_install_uv: bool) -> dagger.UvWorkspaceBuild:
return (
dag.uv()
.workspace(path)
.build(all_extras, all_groups, all_packages, dagger_codegen, no_editable, auto_install_uv)
.with_all_workspace_members()
)@func()
example(path: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, noEditable: boolean, autoInstallUv: boolean): UvWorkspaceBuild {
return dag
.uv()
.workspace(path)
.build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
.withAllWorkspaceMembers()
}withContainer() 🔗
Return a new UvWorkspaceBuild with a different container but the same plan.
Return Type
WorkspaceBuild !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| container | Container ! | - | Replacement container (e.g. after installing non-Python packages) |
Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
build --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean --no-editable boolean --auto-install-uv boolean \
with-container --container IMAGE:TAGfunc (m *MyModule) Example(path string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, noEditable bool, autoInstallUv bool, container *dagger.Container) *dagger.UvWorkspaceBuild {
return dag.
Uv().
Workspace(path).
Build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv).
WithContainer(container)
}@function
def example(path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, no_editable: bool, auto_install_uv: bool, container: dagger.Container) -> dagger.UvWorkspaceBuild:
return (
dag.uv()
.workspace(path)
.build(all_extras, all_groups, all_packages, dagger_codegen, no_editable, auto_install_uv)
.with_container(container)
)@func()
example(path: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, noEditable: boolean, autoInstallUv: boolean, container: Container): UvWorkspaceBuild {
return dag
.uv()
.workspace(path)
.build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
.withContainer(container)
}withLocalDependencies() 🔗
Install the scaffolded local packages, copying their real source at the right time.
For editable installs (the default), run uv sync against the package
stubs from with_workspace_files, then copy real source over the stubs last.
Editable installs are path links, so the source goes live without a re-sync —
meaning source-only changes don’t invalidate the cached install layer.
For non-editable installs (no_editable=True), uv sync builds a wheel
from whatever source is present and bakes it into site-packages, so the real
source must be copied in before the sync — there are no path links for a
copy-last to make live, and syncing against the stubs would bake empty modules.
Return Type
Container ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
build --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean --no-editable boolean --auto-install-uv boolean \
with-local-dependenciesfunc (m *MyModule) Example(path string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, noEditable bool, autoInstallUv bool) *dagger.Container {
return dag.
Uv().
Workspace(path).
Build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv).
WithLocalDependencies()
}@function
def example(path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, no_editable: bool, auto_install_uv: bool) -> dagger.Container:
return (
dag.uv()
.workspace(path)
.build(all_extras, all_groups, all_packages, dagger_codegen, no_editable, auto_install_uv)
.with_local_dependencies()
)@func()
example(path: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, noEditable: boolean, autoInstallUv: boolean): Container {
return dag
.uv()
.workspace(path)
.build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
.withLocalDependencies()
}withPythonInstall() 🔗
Install a managed Python via uv python install.
Useful on a bare base with no system Python; pass the version the
workspace’s requires-python resolves to.
Return Type
WorkspaceBuild !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String ! | - | Python version to install via |
Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
build --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean --no-editable boolean --auto-install-uv boolean \
with-python-install --version stringfunc (m *MyModule) Example(path string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, noEditable bool, autoInstallUv bool, version string) *dagger.UvWorkspaceBuild {
return dag.
Uv().
Workspace(path).
Build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv).
WithPythonInstall(version)
}@function
def example(path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, no_editable: bool, auto_install_uv: bool, version: str) -> dagger.UvWorkspaceBuild:
return (
dag.uv()
.workspace(path)
.build(all_extras, all_groups, all_packages, dagger_codegen, no_editable, auto_install_uv)
.with_python_install(version)
)@func()
example(path: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, noEditable: boolean, autoInstallUv: boolean, version: string): UvWorkspaceBuild {
return dag
.uv()
.workspace(path)
.build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
.withPythonInstall(version)
}withPythonPin() 🔗
Pin the project’s Python with uv python pin (writes .python-version).
Makes subsequent uv venv/uv sync select this exact version.
Return Type
WorkspaceBuild !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String ! | - | Python version to pin via |
Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
build --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean --no-editable boolean --auto-install-uv boolean \
with-python-pin --version stringfunc (m *MyModule) Example(path string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, noEditable bool, autoInstallUv bool, version string) *dagger.UvWorkspaceBuild {
return dag.
Uv().
Workspace(path).
Build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv).
WithPythonPin(version)
}@function
def example(path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, no_editable: bool, auto_install_uv: bool, version: str) -> dagger.UvWorkspaceBuild:
return (
dag.uv()
.workspace(path)
.build(all_extras, all_groups, all_packages, dagger_codegen, no_editable, auto_install_uv)
.with_python_pin(version)
)@func()
example(path: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, noEditable: boolean, autoInstallUv: boolean, version: string): UvWorkspaceBuild {
return dag
.uv()
.workspace(path)
.build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
.withPythonPin(version)
}withRemoteDependencies() 🔗
Install remote (non-local) dependencies via uv sync --no-install-local.
Skip this step when another tool (e.g. pulumi install) handles
dependency installation.
Return Type
WorkspaceBuild ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
build --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean --no-editable boolean --auto-install-uv boolean \
with-remote-dependenciesfunc (m *MyModule) Example(path string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, noEditable bool, autoInstallUv bool) *dagger.UvWorkspaceBuild {
return dag.
Uv().
Workspace(path).
Build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv).
WithRemoteDependencies()
}@function
def example(path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, no_editable: bool, auto_install_uv: bool) -> dagger.UvWorkspaceBuild:
return (
dag.uv()
.workspace(path)
.build(all_extras, all_groups, all_packages, dagger_codegen, no_editable, auto_install_uv)
.with_remote_dependencies()
)@func()
example(path: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, noEditable: boolean, autoInstallUv: boolean): UvWorkspaceBuild {
return dag
.uv()
.workspace(path)
.build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
.withRemoteDependencies()
}withUv() 🔗
Copy the uv binary into the build container.
Useful when using a custom base_container that doesn’t ship uv.
Copies the static binary from the official distroless image to /uv/uv
and prepends /uv to $PATH.
Return Type
WorkspaceBuild !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String | null | uv version to install. Defaults to the version detected from the workspace. |
Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
build --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean --no-editable boolean --auto-install-uv boolean \
with-uvfunc (m *MyModule) Example(path string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, noEditable bool, autoInstallUv bool) *dagger.UvWorkspaceBuild {
return dag.
Uv().
Workspace(path).
Build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv).
WithUv()
}@function
def example(path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, no_editable: bool, auto_install_uv: bool) -> dagger.UvWorkspaceBuild:
return (
dag.uv()
.workspace(path)
.build(all_extras, all_groups, all_packages, dagger_codegen, no_editable, auto_install_uv)
.with_uv()
)@func()
example(path: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, noEditable: boolean, autoInstallUv: boolean): UvWorkspaceBuild {
return dag
.uv()
.workspace(path)
.build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
.withUv()
}withVenv() 🔗
Create the project virtual environment with uv venv.
Run before the install steps so the subsequent uv sync populates this
environment rather than creating its own (e.g. a relocatable venv that
can be copied to a different path in a later stage).
Return Type
WorkspaceBuild !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| relocatable | Boolean ! | false | Create a relocatable virtual environment ( |
| args | [String ! ] | null | Additional arguments passed through to |
Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
build --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean --no-editable boolean --auto-install-uv boolean \
with-venv --relocatable booleanfunc (m *MyModule) Example(path string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, noEditable bool, autoInstallUv bool, relocatable bool) *dagger.UvWorkspaceBuild {
return dag.
Uv().
Workspace(path).
Build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv).
WithVenv(relocatable)
}@function
def example(path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, no_editable: bool, auto_install_uv: bool, relocatable: bool) -> dagger.UvWorkspaceBuild:
return (
dag.uv()
.workspace(path)
.build(all_extras, all_groups, all_packages, dagger_codegen, no_editable, auto_install_uv)
.with_venv(relocatable)
)@func()
example(path: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, noEditable: boolean, autoInstallUv: boolean, relocatable: boolean): UvWorkspaceBuild {
return dag
.uv()
.workspace(path)
.build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
.withVenv(relocatable)
}withWorkspaceFiles() 🔗
Scaffold needed local package stubs (pyproject.toml + empty src/) into the container.
Return Type
WorkspaceBuild ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
build --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean --no-editable boolean --auto-install-uv boolean \
with-workspace-filesfunc (m *MyModule) Example(path string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, noEditable bool, autoInstallUv bool) *dagger.UvWorkspaceBuild {
return dag.
Uv().
Workspace(path).
Build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv).
WithWorkspaceFiles()
}@function
def example(path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, no_editable: bool, auto_install_uv: bool) -> dagger.UvWorkspaceBuild:
return (
dag.uv()
.workspace(path)
.build(all_extras, all_groups, all_packages, dagger_codegen, no_editable, auto_install_uv)
.with_workspace_files()
)@func()
example(path: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, noEditable: boolean, autoInstallUv: boolean): UvWorkspaceBuild {
return dag
.uv()
.workspace(path)
.build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
.withWorkspaceFiles()
}Index 🔗
A configured package index for a uv workspace.
name() 🔗
Index name.
Return Type
String ! Example
Function UvIndex.name is not accessible from the uv moduleFunction UvIndex.name is not accessible from the uv moduleFunction UvIndex.name is not accessible from the uv moduleFunction UvIndex.name is not accessible from the uv moduleurl() 🔗
Index URL (used for resolving and downloading packages).
Return Type
String ! Example
Function UvIndex.url is not accessible from the uv moduleFunction UvIndex.url is not accessible from the uv moduleFunction UvIndex.url is not accessible from the uv moduleFunction UvIndex.url is not accessible from the uv modulepublishUrl() 🔗
URL to use when publishing packages to this index (defaults to
urlif unset).
Return Type
String Example
Function UvIndex.publishUrl is not accessible from the uv moduleFunction UvIndex.publishUrl is not accessible from the uv moduleFunction UvIndex.publishUrl is not accessible from the uv moduleFunction UvIndex.publishUrl is not accessible from the uv moduledefault() 🔗
When true, this index replaces PyPI as the default index.
Return Type
Boolean ! Example
Function UvIndex.default is not accessible from the uv moduleFunction UvIndex.default is not accessible from the uv moduleFunction UvIndex.default is not accessible from the uv moduleFunction UvIndex.default is not accessible from the uv moduleexplicit() 🔗
When true, packages are only installed from this index if explicitly pinned to it.
Return Type
Boolean ! Example
Function UvIndex.explicit is not accessible from the uv moduleFunction UvIndex.explicit is not accessible from the uv moduleFunction UvIndex.explicit is not accessible from the uv moduleFunction UvIndex.explicit is not accessible from the uv moduleauthenticate() 🔗
Credential handling: ‘always’, ‘never’, or null (try unauthenticated first, then authenticate).
Return Type
String Example
Function UvIndex.authenticate is not accessible from the uv moduleFunction UvIndex.authenticate is not accessible from the uv moduleFunction UvIndex.authenticate is not accessible from the uv moduleFunction UvIndex.authenticate is not accessible from the uv moduleformat() 🔗
Index format: ‘flat’ for flat directories/HTML lists, null for standard PEP 503 registries.
Return Type
String Example
Function UvIndex.format is not accessible from the uv moduleFunction UvIndex.format is not accessible from the uv moduleFunction UvIndex.format is not accessible from the uv moduleFunction UvIndex.format is not accessible from the uv modulePackageSource 🔗
A single member package within a uv workspace.
Carries the workspace source tree, the workspace root path, and the member’s own path so it can read both workspace-level and package-level index configuration.
source() 🔗
Source tree containing the workspace.
Return Type
Directory ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
package --path string \
sourcefunc (m *MyModule) Example(path string, path1 string) *dagger.Directory {
return dag.
Uv().
Workspace(path).
Package(path1).
Source()
}@function
def example(path: str, path1: str) -> dagger.Directory:
return (
dag.uv()
.workspace(path)
.package(path1)
.source()
)@func()
example(path: string, path1: string): Directory {
return dag
.uv()
.workspace(path)
.package(path1)
.source()
}workspacePath() 🔗
Workspace root path within source (
.for a root workspace).
Return Type
String ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
package --path string \
workspace-pathfunc (m *MyModule) Example(ctx context.Context, path string, path1 string) string {
return dag.
Uv().
Workspace(path).
Package(path1).
WorkspacePath(ctx)
}@function
async def example(path: str, path1: str) -> str:
return await (
dag.uv()
.workspace(path)
.package(path1)
.workspace_path()
)@func()
async example(path: string, path1: string): Promise<string> {
return dag
.uv()
.workspace(path)
.package(path1)
.workspacePath()
}packagePath() 🔗
Package path relative to the workspace root.
Return Type
String ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
package --path string \
package-pathfunc (m *MyModule) Example(ctx context.Context, path string, path1 string) string {
return dag.
Uv().
Workspace(path).
Package(path1).
PackagePath(ctx)
}@function
async def example(path: str, path1: str) -> str:
return await (
dag.uv()
.workspace(path)
.package(path1)
.package_path()
)@func()
async example(path: string, path1: string): Promise<string> {
return dag
.uv()
.workspace(path)
.package(path1)
.packagePath()
}indices() 🔗
The package indices configured in this member’s pyproject.toml.
Reads [[tool.uv.index]] from the member’s own pyproject.toml.
When include_from_workspace is set, also reads workspace-level
indices and merges them (package-level entries win on name collision).
Return Type
[Index ! ] !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| includeFromWorkspace | Boolean ! | false | Merge indices from the workspace root’s configuration. When True, workspace-level indices are included alongside the package’s own indices (deduplicated by name, package wins). |
Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
package --path string \
indices --include-from-workspace booleanfunc (m *MyModule) Example(path string, path1 string, includeFromWorkspace bool) []*dagger.UvIndex {
return dag.
Uv().
Workspace(path).
Package(path1).
Indices(includeFromWorkspace)
}@function
def example(path: str, path1: str, include_from_workspace: bool) -> List[dagger.UvIndex]:
return (
dag.uv()
.workspace(path)
.package(path1)
.indices(include_from_workspace)
)@func()
example(path: string, path1: string, includeFromWorkspace: boolean): UvIndex[] {
return dag
.uv()
.workspace(path)
.package(path1)
.indices(includeFromWorkspace)
}WorkspaceSource 🔗
A self-contained uv workspace: the source files rooted at a uv.lock.
Carries the source tree and the workspace’s path within it ("." for a
root workspace). From those it derives everything it needs to audit the
locked dependencies or build a minimal container for a package — keeping
the parent Uv a thin, container-free entrypoint.
The full source (rather than just the sliced workspace directory) is
carried so builds can reach sibling path-dependencies that live outside
the workspace root (e.g. ../my-dep in a nested workspace).
Named UvWorkspaceSource (not UvWorkspace) to avoid colliding with
the top-level Uv constructor when composed in a parent module.
source() 🔗
Source tree containing the workspace (and any sibling path-dependencies).
Return Type
Directory ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
sourcefunc (m *MyModule) Example(path string) *dagger.Directory {
return dag.
Uv().
Workspace(path).
Source()
}@function
def example(path: str) -> dagger.Directory:
return (
dag.uv()
.workspace(path)
.source()
)@func()
example(path: string): Directory {
return dag
.uv()
.workspace(path)
.source()
}path() 🔗
Workspace root path (holding uv.lock/pyproject.toml) within
source..for a root workspace.
Return Type
String ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
pathfunc (m *MyModule) Example(ctx context.Context, path string) string {
return dag.
Uv().
Workspace(path).
Path(ctx)
}@function
async def example(path: str) -> str:
return await (
dag.uv()
.workspace(path)
.path()
)@func()
async example(path: string): Promise<string> {
return dag
.uv()
.workspace(path)
.path()
}audit() 🔗
Audit this workspace’s locked dependencies.
The image is resolved here (explicit image > image_ref(uv_version) >
the version detected from the workspace) and handed to a container-bound
Audit; resolving an image tag is pure string work, so this type stays
container-free.
Return Type
Audit !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| uvVersion | String | null | uv version (image tag) to audit with. Defaults to the version detected from the workspace; ignored when |
| image | String | null | Full uv image reference to audit with. Overrides |
Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
auditfunc (m *MyModule) Example(path string) *dagger.UvAudit {
return dag.
Uv().
Workspace(path).
Audit()
}@function
def example(path: str) -> dagger.UvAudit:
return (
dag.uv()
.workspace(path)
.audit()
)@func()
example(path: string): UvAudit {
return dag
.uv()
.workspace(path)
.audit()
}build() 🔗
Prepare a build for this workspace without installing anything yet.
Resolves the sync plan, mounts the uv cache, and copies the root
pyproject.toml and uv.lock into the container. Nothing is installed —
the returned UvWorkspaceBuild drives the pipeline from here:
with_remote_dependencies() to install remote deps, with_workspace_files()
to scaffold local packages, then with_local_dependencies() to install them.
Skip with_remote_dependencies() when another tool (e.g. pulumi install)
handles dependency installation.
Return Type
WorkspaceBuild !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| baseContainer | Container | null | Container to build on top of (auth, system packages, etc.). Defaults to a Debian-based uv image at the workspace’s uv version (uv provisions Python on demand). |
| package | [String ! ] | null | No description provided |
| extra | [String ! ] | null | No description provided |
| group | [String ! ] | null | No description provided |
| allExtras | Boolean ! | false | Install every extra; maps to |
| allGroups | Boolean ! | false | Install every dependency group; maps to |
| allPackages | Boolean ! | false | Install every workspace member; maps to |
| daggerCodegen | Boolean ! | true | If True (default), and the package being built has a |
| noEditable | Boolean ! | false | Install local/workspace packages non-editable ( |
| autoInstallUv | Boolean ! | true | Automatically install the uv binary if it is not already on $PATH. Set to False if your base_container already ships uv. |
Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
build --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean --no-editable boolean --auto-install-uv booleanfunc (m *MyModule) Example(path string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, noEditable bool, autoInstallUv bool) *dagger.UvWorkspaceBuild {
return dag.
Uv().
Workspace(path).
Build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
}@function
def example(path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, no_editable: bool, auto_install_uv: bool) -> dagger.UvWorkspaceBuild:
return (
dag.uv()
.workspace(path)
.build(all_extras, all_groups, all_packages, dagger_codegen, no_editable, auto_install_uv)
)@func()
example(path: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, noEditable: boolean, autoInstallUv: boolean): UvWorkspaceBuild {
return dag
.uv()
.workspace(path)
.build(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
}indices() 🔗
The package indices configured for this workspace.
Reads [[index]] from uv.toml when present, otherwise falls back
to [[tool.uv.index]] in pyproject.toml — matching uv’s own
precedence (uv.toml overrides the entire [tool.uv] section).
When include_from_members is set, also reads [[tool.uv.index]]
from every workspace member’s pyproject.toml and merges them
(member entries take precedence on name collision).
Return Type
[Index ! ] !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| includeFromMembers | Boolean ! | false | Merge indices from all workspace members’ pyproject.toml files. When True, member-level indices are included alongside workspace-level indices (member entries win on name collision). |
Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
indices --include-from-members booleanfunc (m *MyModule) Example(path string, includeFromMembers bool) []*dagger.UvIndex {
return dag.
Uv().
Workspace(path).
Indices(includeFromMembers)
}@function
def example(path: str, include_from_members: bool) -> List[dagger.UvIndex]:
return (
dag.uv()
.workspace(path)
.indices(include_from_members)
)@func()
example(path: string, includeFromMembers: boolean): UvIndex[] {
return dag
.uv()
.workspace(path)
.indices(includeFromMembers)
}install() 🔗
Build a minimal container with deps installed for the given package(s).
Convenience method composing build, optionally with_venv,
with_remote_dependencies, with_workspace_files, and
with_local_dependencies. For fine-grained control (e.g. running
pulumi install between remote deps and local source), call them individually.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| baseContainer | Container | null | Container to build on (auth, system packages, etc.). Defaults to a Debian-based uv image at the workspace’s uv version (uv provisions Python on demand). |
| package | [String ! ] | null | No description provided |
| extra | [String ! ] | null | No description provided |
| group | [String ! ] | null | No description provided |
| allExtras | Boolean ! | false | Install every extra; maps to |
| allGroups | Boolean ! | false | Install every dependency group; maps to |
| allPackages | Boolean ! | false | Install every workspace member; maps to |
| daggerCodegen | Boolean ! | true | If True (default), and the package being built has a |
| noEditable | Boolean ! | false | Install local/workspace packages non-editable ( |
| venv | Boolean ! | false | Create the virtual environment up front with |
| venvRelocatable | Boolean ! | false | When |
| autoInstallUv | Boolean ! | true | Automatically install the uv binary if it is not already on $PATH. Set to False if your base_container already ships uv. |
Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
install --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean --no-editable boolean --venv boolean --venv-relocatable boolean --auto-install-uv booleanfunc (m *MyModule) Example(path string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, noEditable bool, venv bool, venvRelocatable bool, autoInstallUv bool) *dagger.Container {
return dag.
Uv().
Workspace(path).
Install(allExtras, allGroups, allPackages, daggerCodegen, noEditable, venv, venvRelocatable, autoInstallUv)
}@function
def example(path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, no_editable: bool, venv: bool, venv_relocatable: bool, auto_install_uv: bool) -> dagger.Container:
return (
dag.uv()
.workspace(path)
.install(all_extras, all_groups, all_packages, dagger_codegen, no_editable, venv, venv_relocatable, auto_install_uv)
)@func()
example(path: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, noEditable: boolean, venv: boolean, venvRelocatable: boolean, autoInstallUv: boolean): Container {
return dag
.uv()
.workspace(path)
.install(allExtras, allGroups, allPackages, daggerCodegen, noEditable, venv, venvRelocatable, autoInstallUv)
}package() 🔗
A single member package within this workspace.
Return Type
PackageSource !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| path | String ! | - | Member package path relative to the workspace root. |
Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
package --path stringfunc (m *MyModule) Example(path string, path1 string) *dagger.UvPackageSource {
return dag.
Uv().
Workspace(path).
Package(path1)
}@function
def example(path: str, path1: str) -> dagger.UvPackageSource:
return (
dag.uv()
.workspace(path)
.package(path1)
)@func()
example(path: string, path1: string): UvPackageSource {
return dag
.uv()
.workspace(path)
.package(path1)
}pythonVersion() 🔗
The Python version pinned by the workspace’s .python-version, if any.
Returns its contents (e.g. 3.13.7), or None when the file is absent.
build stages this pin so uv venv/uv sync select the exact interpreter
instead of resolving requires-python.
Return Type
String ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
python-versionfunc (m *MyModule) Example(ctx context.Context, path string) string {
return dag.
Uv().
Workspace(path).
PythonVersion(ctx)
}@function
async def example(path: str) -> str:
return await (
dag.uv()
.workspace(path)
.python_version()
)@func()
async example(path: string): Promise<string> {
return dag
.uv()
.workspace(path)
.pythonVersion()
}uvVersion() 🔗
The uv version this workspace requires, as a concrete image tag.
Reads required-version (a PEP 440 specifier) from uv.toml or the
[tool.uv] table of pyproject.toml. Exact pins are used as-is; ranges
resolve to their minimal compatible version (no PyPI lookup). Falls back
to the default latest tag when unspecified.
Return Type
String ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
uv-versionfunc (m *MyModule) Example(ctx context.Context, path string) string {
return dag.
Uv().
Workspace(path).
UvVersion(ctx)
}@function
async def example(path: str) -> str:
return await (
dag.uv()
.workspace(path)
.uv_version()
)@func()
async example(path: string): Promise<string> {
return dag
.uv()
.workspace(path)
.uvVersion()
}venv() 🔗
Install into a relocatable venv and export it with the Python it links against.
Like install, but always builds a relocatable venv and returns a UvVenv
(the venv plus its uv-managed Python) that .into(container, path) can drop
into any image. Use this — rather than install — when copying the
environment into another container. Pair with no_editable=True so the
exported venv carries no dependency on the workspace source.
Return Type
Venv !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| baseContainer | Container | null | Container to build on; defaults to a Debian-based uv image at the workspace’s uv version. |
| package | [String ! ] | null | No description provided |
| extra | [String ! ] | null | No description provided |
| group | [String ! ] | null | No description provided |
| allExtras | Boolean ! | false | Install every extra; maps to |
| allGroups | Boolean ! | false | Install every dependency group; maps to |
| allPackages | Boolean ! | false | Install every workspace member; maps to |
| daggerCodegen | Boolean ! | true | If True (default), and the package being built has a |
| noEditable | Boolean ! | false | Install local/workspace packages non-editable ( |
| autoInstallUv | Boolean ! | true | Automatically install the uv binary if it is not already on $PATH. Set to False if your base_container already ships uv. |
Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path string \
venv --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean --no-editable boolean --auto-install-uv booleanfunc (m *MyModule) Example(path string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, noEditable bool, autoInstallUv bool) *dagger.UvVenv {
return dag.
Uv().
Workspace(path).
Venv(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
}@function
def example(path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, no_editable: bool, auto_install_uv: bool) -> dagger.UvVenv:
return (
dag.uv()
.workspace(path)
.venv(all_extras, all_groups, all_packages, dagger_codegen, no_editable, auto_install_uv)
)@func()
example(path: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, noEditable: boolean, autoInstallUv: boolean): UvVenv {
return dag
.uv()
.workspace(path)
.venv(allExtras, allGroups, allPackages, daggerCodegen, noEditable, autoInstallUv)
}Uv 🔗
Entrypoint for the uv module.
Hands out UvWorkspaceSource objects — one per workspace — which expose additional functionality.
Use workspace to grab a single workspace by path or get_workspaces to list them all.
Learn more in the docs.
source() 🔗
Source directory.
Return Type
Directory ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
sourcefunc (m *MyModule) Example() *dagger.Directory {
return dag.
Uv().
Source()
}@function
def example() -> dagger.Directory:
return (
dag.uv()
.source()
)@func()
example(): Directory {
return dag
.uv()
.source()
}audit() 🔗
Run uv audit for every workspace in parallel.
Exits non-zero when any (non-excluded) workspace fails its audit.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| exclude | [String ! ] | null | Glob patterns (source-relative) of workspace paths to skip, e.g. |
| uvVersion | String | null | uv version (image tag) to run with. Defaults to the version detected per workspace; ignored when |
| image | String | null | Full uv image reference to run with. Overrides |
Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
auditfunc (m *MyModule) Example(ctx context.Context) {
return dag.
Uv().
Audit(ctx)
}@function
async def example() -> None:
return await (
dag.uv()
.audit()
)@func()
async example(): Promise<void> {
return dag
.uv()
.audit()
}getWorkspaces() 🔗
Every uv workspace in the source tree (one per uv.lock).
Return Type
[WorkspaceSource ! ] ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
get-workspacesfunc (m *MyModule) Example() []*dagger.UvWorkspaceSource {
return dag.
Uv().
GetWorkspaces()
}@function
def example() -> List[dagger.UvWorkspaceSource]:
return (
dag.uv()
.get_workspaces()
)@func()
example(): UvWorkspaceSource[] {
return dag
.uv()
.getWorkspaces()
}workspace() 🔗
A single uv workspace at path within the source tree.
The returned UvWorkspaceSource can audit its locked dependencies or
build a minimal container for a package.
Return Type
WorkspaceSource !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| path | String ! | "." | Path to the workspace root (holding uv.lock and pyproject.toml) within the source directory. |
Example
dagger -m github.com/typesafe-ai/daggerverse/uv@fb37f42c219f4f59e6bd9d2e66cb682bf5ade08e call \
workspace --path stringfunc (m *MyModule) Example(path string) *dagger.UvWorkspaceSource {
return dag.
Uv().
Workspace(path)
}@function
def example(path: str) -> dagger.UvWorkspaceSource:
return (
dag.uv()
.workspace(path)
)@func()
example(path: string): UvWorkspaceSource {
return dag
.uv()
.workspace(path)
}