poetry
This examples demostrates how any package manager that supportspyproject.toml with a build backend (PEP 517) naturally works with
Dagger.
Python modules are installed with `pip install .` by the runtime container.
As long as a `main` package is installed in a way that's importable with
`import main`, it should work with Dagger.
Installation
dagger install github.com/helderco/daggerverse/poetry@v0.2.0Entrypoint
Return Type
Poetry ! Example
dagger -m github.com/helderco/daggerverse/poetry@5fafda91fbcc8bc0ad0afc884e03ff40bf78717d call \
func (m *MyModule) Example() *dagger.Poetry {
return dag.
Poetry()
}@function
def example() -> dagger.Poetry:
return (
dag.poetry()
)@func()
example(): Poetry {
return dag
.poetry()
}Types
Poetry 🔗
Main object type for this module.
containerEcho() 🔗
Echo a string in an alpine container.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| stringArg | String ! | - | The string to echo |
Example
dagger -m github.com/helderco/daggerverse/poetry@5fafda91fbcc8bc0ad0afc884e03ff40bf78717d call \
container-echo --string-arg stringfunc (m *MyModule) Example(stringArg string) *dagger.Container {
return dag.
Poetry().
ContainerEcho(stringArg)
}@function
def example(string_arg: str) -> dagger.Container:
return (
dag.poetry()
.container_echo(string_arg)
)@func()
example(stringArg: string): Container {
return dag
.poetry()
.containerEcho(stringArg)
}grepDir() 🔗
Find a pattern in a directory.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| directoryArg | Directory ! | - | The directory to search in |
| pattern | String ! | - | The pattern to search for |
Example
dagger -m github.com/helderco/daggerverse/poetry@5fafda91fbcc8bc0ad0afc884e03ff40bf78717d call \
grep-dir --directory-arg DIR_PATH --pattern stringfunc (m *MyModule) Example(ctx context.Context, directoryArg *dagger.Directory, pattern string) string {
return dag.
Poetry().
GrepDir(ctx, directoryArg, pattern)
}@function
async def example(directory_arg: dagger.Directory, pattern: str) -> str:
return await (
dag.poetry()
.grep_dir(directory_arg, pattern)
)@func()
async example(directoryArg: Directory, pattern: string): Promise<string> {
return dag
.poetry()
.grepDir(directoryArg, pattern)
}