python-uv-ruff
A blueprint module for python projects that use uv and ruff
Installation
dagger install github.com/kpenfound/blueprints/python-uv-ruff@2bb1d301e87cbe218b65c99f4e74618cda252638Entrypoint
Return Type
PythonUvRuff !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | The source code of the project |
| baseImage | String ! | "python:3" | The base image to use for all environments |
Example
dagger -m github.com/kpenfound/blueprints/python-uv-ruff@2bb1d301e87cbe218b65c99f4e74618cda252638 call \
--base-image stringfunc (m *MyModule) Example(baseImage string) *dagger.PythonUvRuff {
return dag.
PythonUvRuff(baseImage)
}@function
def example(base_image: str) -> dagger.PythonUvRuff:
return (
dag.python_uv_ruff(base_image)
)@func()
example(baseImage: string): PythonUvRuff {
return dag
.pythonUvRuff(baseImage)
}Types
PythonUvRuff 🔗
Dagger module for Python projects.
base() 🔗
Returns the Python base image with the project setup.
Return Type
Container ! Example
dagger -m github.com/kpenfound/blueprints/python-uv-ruff@2bb1d301e87cbe218b65c99f4e74618cda252638 call \
--base-image string basefunc (m *MyModule) Example(baseImage string) *dagger.Container {
return dag.
PythonUvRuff(baseImage).
Base()
}@function
def example(base_image: str) -> dagger.Container:
return (
dag.python_uv_ruff(base_image)
.base()
)@func()
example(baseImage: string): Container {
return dag
.pythonUvRuff(baseImage)
.base()
}lint() 🔗
Runs the linter using ruff.
Return Type
String ! Example
dagger -m github.com/kpenfound/blueprints/python-uv-ruff@2bb1d301e87cbe218b65c99f4e74618cda252638 call \
--base-image string lintfunc (m *MyModule) Example(ctx context.Context, baseImage string) string {
return dag.
PythonUvRuff(baseImage).
Lint(ctx)
}@function
async def example(base_image: str) -> str:
return await (
dag.python_uv_ruff(base_image)
.lint()
)@func()
async example(baseImage: string): Promise<string> {
return dag
.pythonUvRuff(baseImage)
.lint()
}test() 🔗
Runs tests using pytest.
Return Type
String ! Example
dagger -m github.com/kpenfound/blueprints/python-uv-ruff@2bb1d301e87cbe218b65c99f4e74618cda252638 call \
--base-image string testfunc (m *MyModule) Example(ctx context.Context, baseImage string) string {
return dag.
PythonUvRuff(baseImage).
Test(ctx)
}@function
async def example(base_image: str) -> str:
return await (
dag.python_uv_ruff(base_image)
.test()
)@func()
async example(baseImage: string): Promise<string> {
return dag
.pythonUvRuff(baseImage)
.test()
}