Dagger
Search

uv-workspace

No long description provided.

Installation

dagger install github.com/typesafe-ai/daggerverse/uv-workspace@88a7cabf4a8849e373d60d38e23b177f3940525b

Entrypoint

Return Type
UvWorkspace !
Arguments
NameTypeDefault ValueDescription
sourceDirDirectory !-Source directory containing the workspace
baseContainerContainer !-Pre-configured container (with auth, system packages, etc.)
workspacePathString !"."Path to workspace root (holding uv.lock and pyproject.toml) within source_dir
Example
dagger -m github.com/typesafe-ai/daggerverse/uv-workspace@88a7cabf4a8849e373d60d38e23b177f3940525b call \
 --source-dir DIR_PATH --base-container IMAGE:TAG --workspace-path string
func (m *MyModule) Example(sourceDir *dagger.Directory, baseContainer *dagger.Container, workspacePath string) *dagger.UvWorkspace  {
	return dag.
			UvWorkspace(sourceDir, baseContainer, workspacePath)
}
@function
def example(source_dir: dagger.Directory, base_container: dagger.Container, workspace_path: str) -> dagger.UvWorkspace:
	return (
		dag.uv_workspace(source_dir, base_container, workspace_path)
	)
@func()
example(sourceDir: Directory, baseContainer: Container, workspacePath: string): UvWorkspace {
	return dag
		.uvWorkspace(sourceDir, baseContainer, workspacePath)
}

Entrypoint

Return Type
UvWorkspaceUvRemoteBuild !
Arguments
NameTypeDefault ValueDescription
containerContainer !-Container with remote deps installed and local packages stubbed out
planUvWorkspaceUvSyncPlan !-Build configuration carried through the pipeline
Example
dagger -m github.com/typesafe-ai/daggerverse/uv-workspace@88a7cabf4a8849e373d60d38e23b177f3940525b call \
 --container IMAGE:TAG
func (m *MyModule) Example(container *dagger.Container, plan *dagger.UvWorkspaceUvSyncPlan) *dagger.UvWorkspaceUvRemoteBuild  {
	return dag.
			UvWorkspace(container, plan)
}
@function
def example(container: dagger.Container, plan: dagger.UvWorkspaceUvSyncPlan) -> dagger.UvWorkspaceUvRemoteBuild:
	return (
		dag.uv_workspace(container, plan)
	)
@func()
example(container: Container, plan: UvWorkspaceUvSyncPlan): UvWorkspaceUvRemoteBuild {
	return dag
		.uvWorkspace(container, plan)
}

Entrypoint

Return Type
UvWorkspaceUvSyncPlan !
Arguments
NameTypeDefault ValueDescription
sourceDirDirectory !-Source directory containing the workspace
workspacePathString !"."Path to workspace root within source_dir
packageString nullTarget package name
extra[String ! ] nullExtras passed to uv sync
group[String ! ] nullDependency groups passed to uv sync
allExtrasBoolean !falseInstall all extras
allGroupsBoolean !falseInstall all dependency groups
allPackagesBoolean !falseInstall all workspace members
daggerCodegenBoolean !trueRun Dagger codegen
Example
Function UvWorkspaceUvSyncPlan.Constructor is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.Constructor is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.Constructor is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.Constructor is not accessible from the uv-workspace module

Types

UvWorkspace 🔗

Builds minimal project containers by parsing uv.lock to resolve local dependencies.

sourceDir() 🔗

Source directory containing the workspace

Return Type
Directory !
Example
dagger -m github.com/typesafe-ai/daggerverse/uv-workspace@88a7cabf4a8849e373d60d38e23b177f3940525b call \
 --source-dir DIR_PATH --base-container IMAGE:TAG --workspace-path string source-dir
func (m *MyModule) Example(sourceDir *dagger.Directory, baseContainer *dagger.Container, workspacePath string) *dagger.Directory  {
	return dag.
			UvWorkspace(sourceDir, baseContainer, workspacePath).
			SourceDir()
}
@function
def example(source_dir: dagger.Directory, base_container: dagger.Container, workspace_path: str) -> dagger.Directory:
	return (
		dag.uv_workspace(source_dir, base_container, workspace_path)
		.source_dir()
	)
@func()
example(sourceDir: Directory, baseContainer: Container, workspacePath: string): Directory {
	return dag
		.uvWorkspace(sourceDir, baseContainer, workspacePath)
		.sourceDir()
}

baseContainer() 🔗

Pre-configured container (with auth, system packages, etc.)

Return Type
Container !
Example
dagger -m github.com/typesafe-ai/daggerverse/uv-workspace@88a7cabf4a8849e373d60d38e23b177f3940525b call \
 --source-dir DIR_PATH --base-container IMAGE:TAG --workspace-path string base-container
func (m *MyModule) Example(sourceDir *dagger.Directory, baseContainer *dagger.Container, workspacePath string) *dagger.Container  {
	return dag.
			UvWorkspace(sourceDir, baseContainer, workspacePath).
			BaseContainer()
}
@function
def example(source_dir: dagger.Directory, base_container: dagger.Container, workspace_path: str) -> dagger.Container:
	return (
		dag.uv_workspace(source_dir, base_container, workspace_path)
		.base_container()
	)
@func()
example(sourceDir: Directory, baseContainer: Container, workspacePath: string): Container {
	return dag
		.uvWorkspace(sourceDir, baseContainer, workspacePath)
		.baseContainer()
}

workspacePath() 🔗

Path to workspace root (holding uv.lock and pyproject.toml) within source_dir

Return Type
String !
Example
dagger -m github.com/typesafe-ai/daggerverse/uv-workspace@88a7cabf4a8849e373d60d38e23b177f3940525b call \
 --source-dir DIR_PATH --base-container IMAGE:TAG --workspace-path string workspace-path
func (m *MyModule) Example(ctx context.Context, sourceDir *dagger.Directory, baseContainer *dagger.Container, workspacePath string) string  {
	return dag.
			UvWorkspace(sourceDir, baseContainer, workspacePath).
			WorkspacePath(ctx)
}
@function
async def example(source_dir: dagger.Directory, base_container: dagger.Container, workspace_path: str) -> str:
	return await (
		dag.uv_workspace(source_dir, base_container, workspace_path)
		.workspace_path()
	)
@func()
async example(sourceDir: Directory, baseContainer: Container, workspacePath: string): Promise<string> {
	return dag
		.uvWorkspace(sourceDir, baseContainer, workspacePath)
		.workspacePath()
}

withRemoteDependencies() 🔗

Scaffold workspace files and install remote (non-local) dependencies.

Parses uv.lock to find local workspace dependencies, mounts pyproject.toml/uv.lock, scaffolds stubs for local packages, and runs uv sync --no-install-local. Returns a UvRemoteBuild whose container field holds the result. Callers can swap the container via with_container() (e.g. to add Pulumi binaries) before calling with_local_dependencies() to finish the build.

Return Type
UvWorkspaceUvRemoteBuild !
Arguments
NameTypeDefault ValueDescription
packageString nullPackage name; if set, only that package's transitive local deps are scaffolded. Maps to `uv sync --package`
extra[String ! ] nullExtras to install; passed to `uv sync` as repeated `--extra`
group[String ! ] nullDependency groups to install; passed to `uv sync` as repeated `--group`
allExtrasBoolean !falseInstall every extra; maps to `uv sync --all-extras`
allGroupsBoolean !falseInstall every dependency group; maps to `uv sync --all-groups`
allPackagesBoolean !falseInstall every workspace member; maps to `uv sync --all-packages`
daggerCodegenBoolean !trueIf True (default), and the package being built has a `dagger.json`, run Dagger codegen and overlay the generated SDK before `uv sync`. No-op for non-Dagger projects.
Example
dagger -m github.com/typesafe-ai/daggerverse/uv-workspace@88a7cabf4a8849e373d60d38e23b177f3940525b call \
 --source-dir DIR_PATH --base-container IMAGE:TAG --workspace-path string with-remote-dependencies --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean
func (m *MyModule) Example(sourceDir *dagger.Directory, baseContainer *dagger.Container, workspacePath string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool) *dagger.UvWorkspaceUvRemoteBuild  {
	return dag.
			UvWorkspace(sourceDir, baseContainer, workspacePath).
			WithRemoteDependencies(allExtras, allGroups, allPackages, daggerCodegen)
}
@function
def example(source_dir: dagger.Directory, base_container: dagger.Container, workspace_path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool) -> dagger.UvWorkspaceUvRemoteBuild:
	return (
		dag.uv_workspace(source_dir, base_container, workspace_path)
		.with_remote_dependencies(all_extras, all_groups, all_packages, dagger_codegen)
	)
@func()
example(sourceDir: Directory, baseContainer: Container, workspacePath: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean): UvWorkspaceUvRemoteBuild {
	return dag
		.uvWorkspace(sourceDir, baseContainer, workspacePath)
		.withRemoteDependencies(allExtras, allGroups, allPackages, daggerCodegen)
}

build() 🔗

Build a minimal container with deps installed for the given package.

Convenience method composing with_remote_dependencies 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
NameTypeDefault ValueDescription
packageString nullPackage name; if set, only that package's transitive local deps are installed. Maps to `uv sync --package`
extra[String ! ] nullExtras to install; passed to `uv sync` as repeated `--extra`
group[String ! ] nullDependency groups to install; passed to `uv sync` as repeated `--group`
allExtrasBoolean !falseInstall every extra; maps to `uv sync --all-extras`
allGroupsBoolean !falseInstall every dependency group; maps to `uv sync --all-groups`
allPackagesBoolean !falseInstall every workspace member; maps to `uv sync --all-packages`. Only meaningful in workspaces
daggerCodegenBoolean !trueIf True (default), and the package being built has a `dagger.json`, run Dagger codegen and overlay the generated SDK before `uv sync`. This makes `[tool.uv.sources]` entries pointing at the generated tree (e.g. `dagger-io = { path = "sdk" }`) install correctly even though those paths are gitignored. No-op for non-Dagger projects. Pass False to skip.
Example
dagger -m github.com/typesafe-ai/daggerverse/uv-workspace@88a7cabf4a8849e373d60d38e23b177f3940525b call \
 --source-dir DIR_PATH --base-container IMAGE:TAG --workspace-path string build --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean
func (m *MyModule) Example(sourceDir *dagger.Directory, baseContainer *dagger.Container, workspacePath string, allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool) *dagger.Container  {
	return dag.
			UvWorkspace(sourceDir, baseContainer, workspacePath).
			Build(allExtras, allGroups, allPackages, daggerCodegen)
}
@function
def example(source_dir: dagger.Directory, base_container: dagger.Container, workspace_path: str, all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool) -> dagger.Container:
	return (
		dag.uv_workspace(source_dir, base_container, workspace_path)
		.build(all_extras, all_groups, all_packages, dagger_codegen)
	)
@func()
example(sourceDir: Directory, baseContainer: Container, workspacePath: string, allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean): Container {
	return dag
		.uvWorkspace(sourceDir, baseContainer, workspacePath)
		.build(allExtras, allGroups, allPackages, daggerCodegen)
}

UvWorkspaceUvRemoteBuild 🔗

Container with workspace scaffolded and remote deps installed. Returned by `UvWorkspace.with_remote_dependencies()`. To inject custom steps (e.g. `pulumi install`) between remote and local dep installation, read `.container`, modify it, then create a new `UvRemoteBuild` via `.with_container()` before calling `.with_local_dependencies()`.

container() 🔗

Container with remote deps installed and local packages stubbed out

Return Type
Container !
Example
dagger -m github.com/typesafe-ai/daggerverse/uv-workspace@88a7cabf4a8849e373d60d38e23b177f3940525b call \
 with-remote-dependencies --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean \
 container
func (m *MyModule) Example(allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool) *dagger.Container  {
	return dag.
			UvWorkspace().
			WithRemoteDependencies(allExtras, allGroups, allPackages, daggerCodegen).
			Container()
}
@function
def example(all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool) -> dagger.Container:
	return (
		dag.uv_workspace()
		.with_remote_dependencies(all_extras, all_groups, all_packages, dagger_codegen)
		.container()
	)
@func()
example(allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean): Container {
	return dag
		.uvWorkspace()
		.withRemoteDependencies(allExtras, allGroups, allPackages, daggerCodegen)
		.container()
}

plan() 🔗

Build configuration carried through the pipeline

Return Type
UvWorkspaceUvSyncPlan !
Example
dagger -m github.com/typesafe-ai/daggerverse/uv-workspace@88a7cabf4a8849e373d60d38e23b177f3940525b call \
 with-remote-dependencies --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean \
 plan
func (m *MyModule) Example(allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool) *dagger.UvWorkspaceUvSyncPlan  {
	return dag.
			UvWorkspace().
			WithRemoteDependencies(allExtras, allGroups, allPackages, daggerCodegen).
			Plan()
}
@function
def example(all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool) -> dagger.UvWorkspaceUvSyncPlan:
	return (
		dag.uv_workspace()
		.with_remote_dependencies(all_extras, all_groups, all_packages, dagger_codegen)
		.plan()
	)
@func()
example(allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean): UvWorkspaceUvSyncPlan {
	return dag
		.uvWorkspace()
		.withRemoteDependencies(allExtras, allGroups, allPackages, daggerCodegen)
		.plan()
}

withContainer() 🔗

Return a new UvRemoteBuild with a different container but the same plan.

Return Type
UvWorkspaceUvRemoteBuild !
Arguments
NameTypeDefault ValueDescription
containerContainer !-Replacement container (e.g. after installing non-Python packages)
Example
dagger -m github.com/typesafe-ai/daggerverse/uv-workspace@88a7cabf4a8849e373d60d38e23b177f3940525b call \
 with-remote-dependencies --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean \
 with-container --container IMAGE:TAG
func (m *MyModule) Example(allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool, container *dagger.Container) *dagger.UvWorkspaceUvRemoteBuild  {
	return dag.
			UvWorkspace().
			WithRemoteDependencies(allExtras, allGroups, allPackages, daggerCodegen).
			WithContainer(container)
}
@function
def example(all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool, container: dagger.Container) -> dagger.UvWorkspaceUvRemoteBuild:
	return (
		dag.uv_workspace()
		.with_remote_dependencies(all_extras, all_groups, all_packages, dagger_codegen)
		.with_container(container)
	)
@func()
example(allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean, container: Container): UvWorkspaceUvRemoteBuild {
	return dag
		.uvWorkspace()
		.withRemoteDependencies(allExtras, allGroups, allPackages, daggerCodegen)
		.withContainer(container)
}

withLocalDependencies() 🔗

Copy real local source code and install local packages.

Overlays actual src/ directories for each needed local package, runs a final uv sync to install them, and strips the build-time cache mount from the returned container.

Return Type
Container !
Example
dagger -m github.com/typesafe-ai/daggerverse/uv-workspace@88a7cabf4a8849e373d60d38e23b177f3940525b call \
 with-remote-dependencies --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean \
 with-local-dependencies
func (m *MyModule) Example(allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool) *dagger.Container  {
	return dag.
			UvWorkspace().
			WithRemoteDependencies(allExtras, allGroups, allPackages, daggerCodegen).
			WithLocalDependencies()
}
@function
def example(all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool) -> dagger.Container:
	return (
		dag.uv_workspace()
		.with_remote_dependencies(all_extras, all_groups, all_packages, dagger_codegen)
		.with_local_dependencies()
	)
@func()
example(allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean): Container {
	return dag
		.uvWorkspace()
		.withRemoteDependencies(allExtras, allGroups, allPackages, daggerCodegen)
		.withLocalDependencies()
}

UvWorkspaceUvSyncPlan 🔗

Immutable build configuration for a uv workspace sync. Created by `UvWorkspace.with_remote_dependencies()` and carried through the builder pipeline. Holds everything needed to resolve local packages and run the final `uv sync`.

sourceDir() 🔗

Source directory containing the workspace

Return Type
Directory !
Example
Function UvWorkspaceUvSyncPlan.sourceDir is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.sourceDir is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.sourceDir is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.sourceDir is not accessible from the uv-workspace module

workspacePath() 🔗

Path to workspace root within source_dir

Return Type
String !
Example
Function UvWorkspaceUvSyncPlan.workspacePath is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.workspacePath is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.workspacePath is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.workspacePath is not accessible from the uv-workspace module

package() 🔗

Target package name

Return Type
String 
Example
Function UvWorkspaceUvSyncPlan.package is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.package is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.package is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.package is not accessible from the uv-workspace module

extra() 🔗

Extras passed to uv sync

Return Type
[String ! ] 
Example
Function UvWorkspaceUvSyncPlan.extra is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.extra is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.extra is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.extra is not accessible from the uv-workspace module

group() 🔗

Dependency groups passed to uv sync

Return Type
[String ! ] 
Example
Function UvWorkspaceUvSyncPlan.group is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.group is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.group is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.group is not accessible from the uv-workspace module

allExtras() 🔗

Install all extras

Return Type
Boolean !
Example
Function UvWorkspaceUvSyncPlan.allExtras is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.allExtras is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.allExtras is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.allExtras is not accessible from the uv-workspace module

allGroups() 🔗

Install all dependency groups

Return Type
Boolean !
Example
Function UvWorkspaceUvSyncPlan.allGroups is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.allGroups is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.allGroups is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.allGroups is not accessible from the uv-workspace module

allPackages() 🔗

Install all workspace members

Return Type
Boolean !
Example
Function UvWorkspaceUvSyncPlan.allPackages is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.allPackages is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.allPackages is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.allPackages is not accessible from the uv-workspace module

daggerCodegen() 🔗

Run Dagger codegen

Return Type
Boolean !
Example
Function UvWorkspaceUvSyncPlan.daggerCodegen is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.daggerCodegen is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.daggerCodegen is not accessible from the uv-workspace module
Function UvWorkspaceUvSyncPlan.daggerCodegen is not accessible from the uv-workspace module