uv-workspace
No long description provided.
Installation
dagger install github.com/typesafe-ai/daggerverse/uv-workspace@d4a4bc14eea0cb17ec6369c51e6bb7dc8675ba35Entrypoint
Return Type
UvWorkspace !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| sourceDir | Directory ! | - | Source directory containing the workspace |
| baseContainer | Container ! | - | Pre-configured container (with auth, system packages, etc.) |
| workspacePath | String ! | "." | Path to workspace root (holding uv.lock and pyproject.toml) within source_dir |
Example
dagger -m github.com/typesafe-ai/daggerverse/uv-workspace@d4a4bc14eea0cb17ec6369c51e6bb7dc8675ba35 call \
--source-dir DIR_PATH --base-container IMAGE:TAG --workspace-path stringfunc (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)
}Types
UvWorkspaceLocalPackage 🔗
A local (editable/directory) package in a uv workspace.
name() 🔗
Package name
Return Type
String ! Example
Function UvWorkspaceLocalPackage.name is not accessible from the uv-workspace moduleFunction UvWorkspaceLocalPackage.name is not accessible from the uv-workspace moduleFunction UvWorkspaceLocalPackage.name is not accessible from the uv-workspace moduleFunction UvWorkspaceLocalPackage.name is not accessible from the uv-workspace modulepath() 🔗
Workspace-relative path
Return Type
String ! Example
Function UvWorkspaceLocalPackage.path is not accessible from the uv-workspace moduleFunction UvWorkspaceLocalPackage.path is not accessible from the uv-workspace moduleFunction UvWorkspaceLocalPackage.path is not accessible from the uv-workspace moduleFunction UvWorkspaceLocalPackage.path is not accessible from the uv-workspace moduleUvWorkspaceUvSyncPlan 🔗
Resolved build configuration for a uv workspace sync.
wsDir() 🔗
Resolved workspace directory (with codegen overlay if applicable)
Return Type
Directory ! Example
Function UvWorkspaceUvSyncPlan.wsDir is not accessible from the uv-workspace moduleFunction UvWorkspaceUvSyncPlan.wsDir is not accessible from the uv-workspace moduleFunction UvWorkspaceUvSyncPlan.wsDir is not accessible from the uv-workspace moduleFunction UvWorkspaceUvSyncPlan.wsDir is not accessible from the uv-workspace moduleallLocal() 🔗
Every local package in the workspace (sorted by name)
Return Type
[UvWorkspaceLocalPackage ! ] ! Example
Function UvWorkspaceUvSyncPlan.allLocal is not accessible from the uv-workspace moduleFunction UvWorkspaceUvSyncPlan.allLocal is not accessible from the uv-workspace moduleFunction UvWorkspaceUvSyncPlan.allLocal is not accessible from the uv-workspace moduleFunction UvWorkspaceUvSyncPlan.allLocal is not accessible from the uv-workspace moduleneededLocal() 🔗
Local packages the target transitively depends on (sorted by name)
Return Type
[UvWorkspaceLocalPackage ! ] ! Example
Function UvWorkspaceUvSyncPlan.neededLocal is not accessible from the uv-workspace moduleFunction UvWorkspaceUvSyncPlan.neededLocal is not accessible from the uv-workspace moduleFunction UvWorkspaceUvSyncPlan.neededLocal is not accessible from the uv-workspace moduleFunction UvWorkspaceUvSyncPlan.neededLocal is not accessible from the uv-workspace moduleflatPackage() 🔗
Whether the target package uses a flat layout (no build-system)
Return Type
Boolean ! Example
Function UvWorkspaceUvSyncPlan.flatPackage is not accessible from the uv-workspace moduleFunction UvWorkspaceUvSyncPlan.flatPackage is not accessible from the uv-workspace moduleFunction UvWorkspaceUvSyncPlan.flatPackage is not accessible from the uv-workspace moduleFunction UvWorkspaceUvSyncPlan.flatPackage is not accessible from the uv-workspace modulepackage() 🔗
Target package name (None means all packages)
Return Type
String Example
Function UvWorkspaceUvSyncPlan.package is not accessible from the uv-workspace moduleFunction UvWorkspaceUvSyncPlan.package is not accessible from the uv-workspace moduleFunction UvWorkspaceUvSyncPlan.package is not accessible from the uv-workspace moduleFunction UvWorkspaceUvSyncPlan.package is not accessible from the uv-workspace moduleuvSyncArgs() 🔗
Precomputed uv sync argv
Return Type
[String ! ] ! Example
Function UvWorkspaceUvSyncPlan.uvSyncArgs is not accessible from the uv-workspace moduleFunction UvWorkspaceUvSyncPlan.uvSyncArgs is not accessible from the uv-workspace moduleFunction UvWorkspaceUvSyncPlan.uvSyncArgs is not accessible from the uv-workspace moduleFunction UvWorkspaceUvSyncPlan.uvSyncArgs is not accessible from the uv-workspace moduleUvWorkspaceUvRemoteBuild 🔗
Container with remote deps installed; chain with_workspace_files then with_local_dependencies.
container() 🔗
Container with remote deps installed
Return Type
Container ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv-workspace@d4a4bc14eea0cb17ec6369c51e6bb7dc8675ba35 call \
with-remote-dependencies --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean \
containerfunc (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@d4a4bc14eea0cb17ec6369c51e6bb7dc8675ba35 call \
with-remote-dependencies --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean \
planfunc (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()
}withAllWorkspaceMembers() 🔗
Like with_workspace_files but scaffolds every local package, not just transitive deps.
Return Type
UvWorkspaceUvRemoteBuild ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv-workspace@d4a4bc14eea0cb17ec6369c51e6bb7dc8675ba35 call \
with-remote-dependencies --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean \
with-all-workspace-membersfunc (m *MyModule) Example(allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool) *dagger.UvWorkspaceUvRemoteBuild {
return dag.
UvWorkspace().
WithRemoteDependencies(allExtras, allGroups, allPackages, daggerCodegen).
WithAllWorkspaceMembers()
}@function
def example(all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool) -> dagger.UvWorkspaceUvRemoteBuild:
return (
dag.uv_workspace()
.with_remote_dependencies(all_extras, all_groups, all_packages, dagger_codegen)
.with_all_workspace_members()
)@func()
example(allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean): UvWorkspaceUvRemoteBuild {
return dag
.uvWorkspace()
.withRemoteDependencies(allExtras, allGroups, allPackages, daggerCodegen)
.withAllWorkspaceMembers()
}withContainer() 🔗
Return a new UvRemoteBuild with a different container but the same plan.
Return Type
UvWorkspaceUvRemoteBuild !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-workspace@d4a4bc14eea0cb17ec6369c51e6bb7dc8675ba35 call \
with-remote-dependencies --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean \
with-container --container IMAGE:TAGfunc (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 source, run final uv sync, and strip the build-time cache mount.
Return Type
Container ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv-workspace@d4a4bc14eea0cb17ec6369c51e6bb7dc8675ba35 call \
with-remote-dependencies --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean \
with-local-dependenciesfunc (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()
}withWorkspaceFiles() 🔗
Scaffold needed local package stubs (pyproject.toml + empty src/) into the container.
Return Type
UvWorkspaceUvRemoteBuild ! Example
dagger -m github.com/typesafe-ai/daggerverse/uv-workspace@d4a4bc14eea0cb17ec6369c51e6bb7dc8675ba35 call \
with-remote-dependencies --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen boolean \
with-workspace-filesfunc (m *MyModule) Example(allExtras bool, allGroups bool, allPackages bool, daggerCodegen bool) *dagger.UvWorkspaceUvRemoteBuild {
return dag.
UvWorkspace().
WithRemoteDependencies(allExtras, allGroups, allPackages, daggerCodegen).
WithWorkspaceFiles()
}@function
def example(all_extras: bool, all_groups: bool, all_packages: bool, dagger_codegen: bool) -> dagger.UvWorkspaceUvRemoteBuild:
return (
dag.uv_workspace()
.with_remote_dependencies(all_extras, all_groups, all_packages, dagger_codegen)
.with_workspace_files()
)@func()
example(allExtras: boolean, allGroups: boolean, allPackages: boolean, daggerCodegen: boolean): UvWorkspaceUvRemoteBuild {
return dag
.uvWorkspace()
.withRemoteDependencies(allExtras, allGroups, allPackages, daggerCodegen)
.withWorkspaceFiles()
}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@d4a4bc14eea0cb17ec6369c51e6bb7dc8675ba35 call \
--source-dir DIR_PATH --base-container IMAGE:TAG --workspace-path string source-dirfunc (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@d4a4bc14eea0cb17ec6369c51e6bb7dc8675ba35 call \
--source-dir DIR_PATH --base-container IMAGE:TAG --workspace-path string base-containerfunc (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@d4a4bc14eea0cb17ec6369c51e6bb7dc8675ba35 call \
--source-dir DIR_PATH --base-container IMAGE:TAG --workspace-path string workspace-pathfunc (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()
}build() 🔗
Build a minimal container with deps installed for the given package.
Convenience method composing 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 |
|---|---|---|---|
| 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 `uv sync --all-extras` |
| allGroups | Boolean ! | false | Install every dependency group; maps to `uv sync --all-groups` |
| allPackages | Boolean ! | false | Install every workspace member; maps to `uv sync --all-packages` |
| daggerCodegen | Boolean ! | true | If 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@d4a4bc14eea0cb17ec6369c51e6bb7dc8675ba35 call \
--source-dir DIR_PATH --base-container IMAGE:TAG --workspace-path string build --all-extras boolean --all-groups boolean --all-packages boolean --dagger-codegen booleanfunc (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)
}withRemoteDependencies() 🔗
Install remote (non-local) dependencies.
Copies the root pyproject.toml and uv.lock into the container and
runs uv sync --no-install-local. Returns a UvRemoteBuild
for the next pipeline steps: with_workspace_files() to scaffold
local packages, then with_local_dependencies() to install them.
Return Type
UvWorkspaceUvRemoteBuild !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| 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 `uv sync --all-extras` |
| allGroups | Boolean ! | false | Install every dependency group; maps to `uv sync --all-groups` |
| allPackages | Boolean ! | false | Install every workspace member; maps to `uv sync --all-packages` |
| daggerCodegen | Boolean ! | true | If 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@d4a4bc14eea0cb17ec6369c51e6bb7dc8675ba35 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 booleanfunc (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)
}