python
This module has been generated via dagger init and serves as a reference tobasic module structure as you get started with Dagger.
Installation
dagger install github.com/act3-ai/daggerverse/python@66b8ecb72eafdb2f66c77825f7aecd57f6aa51fbEntrypoint
Return Type
Python !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| base | Container | - | base development container |
| src | Directory | - | top-level source code directory |
| netrc | Secret | - | .netrc file for private modules can be passed as env var or file --netrc env:var_name, file:/filepath/.netrc |
| syncArgs | [String ! ] | - | extra arguments for uv sync command |
Example
dagger -m github.com/act3-ai/daggerverse/python@66b8ecb72eafdb2f66c77825f7aecd57f6aa51fb call \
func (m *MyModule) Example() *dagger.Python {
return dag.
Python()
}@function
def example() -> dagger.Python:
return (
dag.python()
)@func()
example(): Python {
return dag
.python()
}Types
Python 🔗
unitTest() 🔗
Return the result of running unit test
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| unitTestDir | String | "test" | unit test directory |
Example
dagger -m github.com/act3-ai/daggerverse/python@66b8ecb72eafdb2f66c77825f7aecd57f6aa51fb call \
unit-testfunc (m *MyModule) Example() *dagger.Directory {
return dag.
Python().
UnitTest()
}@function
def example() -> dagger.Directory:
return (
dag.python()
.unit_test()
)@func()
example(): Directory {
return dag
.python()
.unitTest()
}mypy() 🔗
Return the result of running mypy
Return Type
File ! Example
dagger -m github.com/act3-ai/daggerverse/python@66b8ecb72eafdb2f66c77825f7aecd57f6aa51fb call \
mypyfunc (m *MyModule) Example() *dagger.File {
return dag.
Python().
Mypy()
}@function
def example() -> dagger.File:
return (
dag.python()
.mypy()
)@func()
example(): File {
return dag
.python()
.mypy()
}pylint() 🔗
Return the result of running pylint
Return Type
File ! Example
dagger -m github.com/act3-ai/daggerverse/python@66b8ecb72eafdb2f66c77825f7aecd57f6aa51fb call \
pylintfunc (m *MyModule) Example() *dagger.File {
return dag.
Python().
Pylint()
}@function
def example() -> dagger.File:
return (
dag.python()
.pylint()
)@func()
example(): File {
return dag
.python()
.pylint()
}pyright() 🔗
Return the result of running Pyright
Return Type
File ! Example
dagger -m github.com/act3-ai/daggerverse/python@66b8ecb72eafdb2f66c77825f7aecd57f6aa51fb call \
pyrightfunc (m *MyModule) Example() *dagger.File {
return dag.
Python().
Pyright()
}@function
def example() -> dagger.File:
return (
dag.python()
.pyright()
)@func()
example(): File {
return dag
.python()
.pyright()
}publish() 🔗
publish python package/wheel
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| publishUrl | String ! | - | No description provided |
| username | String ! | - | No description provided |
| password | Secret ! | - | No description provided |
Example
dagger -m github.com/act3-ai/daggerverse/python@66b8ecb72eafdb2f66c77825f7aecd57f6aa51fb call \
publish --publish-url string --username string --password env:MYSECRETfunc (m *MyModule) Example(publishUrl string, username string, password *dagger.Secret) *dagger.Container {
return dag.
Python().
Publish(publishUrl, username, password)
}@function
def example(publish_url: str, username: str, password: dagger.Secret) -> dagger.Container:
return (
dag.python()
.publish(publish_url, username, password)
)@func()
example(publishUrl: string, username: string, password: Secret): Container {
return dag
.python()
.publish(publishUrl, username, password)
}ruffCheck() 🔗
Return the result of running ruff check
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ruffCheckFormat | Enum | "full" | output format of ruff lint check, valid values: concise, full, json, json-lines, junit, grouped, github, gitlab |
Example
dagger -m github.com/act3-ai/daggerverse/python@66b8ecb72eafdb2f66c77825f7aecd57f6aa51fb call \
ruff-checkfunc (m *MyModule) Example() *dagger.File {
return dag.
Python().
RuffCheck()
}@function
def example() -> dagger.File:
return (
dag.python()
.ruff_check()
)@func()
example(): File {
return dag
.python()
.ruffCheck()
}ruffFormat() 🔗
Return the result of running ruff format
Return Type
File ! Example
dagger -m github.com/act3-ai/daggerverse/python@66b8ecb72eafdb2f66c77825f7aecd57f6aa51fb call \
ruff-formatfunc (m *MyModule) Example() *dagger.File {
return dag.
Python().
RuffFormat()
}@function
def example() -> dagger.File:
return (
dag.python()
.ruff_format()
)@func()
example(): File {
return dag
.python()
.ruffFormat()
}service() 🔗
create function test service
Return Type
Service ! Example
dagger -m github.com/act3-ai/daggerverse/python@66b8ecb72eafdb2f66c77825f7aecd57f6aa51fb call \
servicefunc (m *MyModule) Example() *dagger.Service {
return dag.
Python().
Service()
}@function
def example() -> dagger.Service:
return (
dag.python()
.service()
)@func()
example(): Service {
return dag
.python()
.service()
}functionTest() 🔗
Return the result of running function test
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| dir | String | "ftest" | function test directory |
Example
dagger -m github.com/act3-ai/daggerverse/python@66b8ecb72eafdb2f66c77825f7aecd57f6aa51fb call \
function-testfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Python().
FunctionTest(ctx)
}@function
async def example() -> str:
return await (
dag.python()
.function_test()
)@func()
async example(): Promise<string> {
return dag
.python()
.functionTest()
}uv() 🔗
base UV container (with caching, source, and credentials injected)
Return Type
Container ! Example
dagger -m github.com/act3-ai/daggerverse/python@66b8ecb72eafdb2f66c77825f7aecd57f6aa51fb call \
uvfunc (m *MyModule) Example() *dagger.Container {
return dag.
Python().
Uv()
}@function
def example() -> dagger.Container:
return (
dag.python()
.uv()
)@func()
example(): Container {
return dag
.python()
.uv()
}container() 🔗
build dev dependencies first before running test
Return Type
Container ! Example
dagger -m github.com/act3-ai/daggerverse/python@66b8ecb72eafdb2f66c77825f7aecd57f6aa51fb call \
containerfunc (m *MyModule) Example() *dagger.Container {
return dag.
Python().
Container()
}@function
def example() -> dagger.Container:
return (
dag.python()
.container()
)@func()
example(): Container {
return dag
.python()
.container()
}withEnvVariable() 🔗
add an environment variable to the base container
Return Type
Python !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String ! | - | No description provided |
| value | String ! | - | No description provided |
Example
dagger -m github.com/act3-ai/daggerverse/python@66b8ecb72eafdb2f66c77825f7aecd57f6aa51fb call \
with-env-variable --name string --value stringfunc (m *MyModule) Example(name string, value string) *dagger.Python {
return dag.
Python().
WithEnvVariable(name, value)
}@function
def example(name: str, value: str) -> dagger.Python:
return (
dag.python()
.with_env_variable(name, value)
)@func()
example(name: string, value: string): Python {
return dag
.python()
.withEnvVariable(name, value)
}checkLock() 🔗
check that the lockfile is in sync with pyproject.toml
Return Type
String ! Example
dagger -m github.com/act3-ai/daggerverse/python@66b8ecb72eafdb2f66c77825f7aecd57f6aa51fb call \
check-lockfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Python().
CheckLock(ctx)
}@function
async def example() -> str:
return await (
dag.python()
.check_lock()
)@func()
async example(): Promise<string> {
return dag
.python()
.checkLock()
}lint() 🔗
Return the result of all lint checks
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ruffCheckFormat | Enum | "full" | output format of ruff check, valid values: full, concise, gitlab, json, stdout, text |
| skip | [String ! ] | - | No description provided |
Example
dagger -m github.com/act3-ai/daggerverse/python@66b8ecb72eafdb2f66c77825f7aecd57f6aa51fb call \
lintfunc (m *MyModule) Example() *dagger.Directory {
return dag.
Python().
Lint()
}@function
def example() -> dagger.Directory:
return (
dag.python()
.lint()
)@func()
example(): Directory {
return dag
.python()
.lint()
}test() 🔗
Return the result of running all tests(lint and unit test)
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ruffCheckFormat | Enum | "full" | Output format of ruff check, valid values: gitlab, json, table, stdout, text |
| unitTestDir | String | "test" | unit test directoy |
| skip | [String ! ] | - | No description provided |
Example
dagger -m github.com/act3-ai/daggerverse/python@66b8ecb72eafdb2f66c77825f7aecd57f6aa51fb call \
testfunc (m *MyModule) Example() *dagger.Directory {
return dag.
Python().
Test()
}@function
def example() -> dagger.Directory:
return (
dag.python()
.test()
)@func()
example(): Directory {
return dag
.python()
.test()
}