python-poetry
Package main provides functionality for managing Python projects with Poetry.
Installation
dagger install github.com/felipepimentel/daggerverse/python-poetry@v1.11.0
Entrypoint
Return Type
PythonPoetry !
Example
dagger -m github.com/felipepimentel/daggerverse/python-poetry@658b3968b81bca69f2a0a561a8138cc63bfabf08 call \
func (m *myModule) example() *PythonPoetry {
return dag.
PythonPoetry()
}
@function
def example() -> dag.PythonPoetry:
return (
dag.python_poetry()
)
@func()
example(): PythonPoetry {
return dag
.pythonPoetry()
}
Types
PythonPoetry 🔗
PythonPoetry handles Python project management with Poetry.
install() 🔗
Install installs project dependencies using Poetry. Parameters: - ctx: The context for the operation - source: The source directory containing the Python project Returns: - *dagger.Directory: The directory with installed dependencies - error: Any error that occurred during installation
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
Example
dagger -m github.com/felipepimentel/daggerverse/python-poetry@658b3968b81bca69f2a0a561a8138cc63bfabf08 call \
install --source DIR_PATH
func (m *myModule) example(source *Directory) *Directory {
return dag.
PythonPoetry().
Install(source)
}
@function
def example(source: dagger.Directory) -> dagger.Directory:
return (
dag.python_poetry()
.install(source)
)
@func()
example(source: Directory): Directory {
return dag
.pythonPoetry()
.install(source)
}
build() 🔗
Build builds the Python package using Poetry. Parameters: - ctx: The context for the operation - source: The source directory containing the Python project Returns: - *dagger.Directory: The directory containing the built package - error: Any error that occurred during build
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
Example
dagger -m github.com/felipepimentel/daggerverse/python-poetry@658b3968b81bca69f2a0a561a8138cc63bfabf08 call \
build --source DIR_PATH
func (m *myModule) example(source *Directory) *Directory {
return dag.
PythonPoetry().
Build(source)
}
@function
def example(source: dagger.Directory) -> dagger.Directory:
return (
dag.python_poetry()
.build(source)
)
@func()
example(source: Directory): Directory {
return dag
.pythonPoetry()
.build(source)
}
test() 🔗
Test runs tests using Poetry. Parameters: - ctx: The context for the operation - source: The source directory containing the Python project Returns: - string: The test output - error: Any error that occurred during testing
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
Example
dagger -m github.com/felipepimentel/daggerverse/python-poetry@658b3968b81bca69f2a0a561a8138cc63bfabf08 call \
test --source DIR_PATH
func (m *myModule) example(ctx context.Context, source *Directory) string {
return dag.
PythonPoetry().
Test(ctx, source)
}
@function
async def example(source: dagger.Directory) -> str:
return await (
dag.python_poetry()
.test(source)
)
@func()
async example(source: Directory): Promise<string> {
return dag
.pythonPoetry()
.test(source)
}
lock() 🔗
Lock updates the poetry.lock file. Parameters: - ctx: The context for the operation - source: The source directory containing the Python project Returns: - *dagger.Directory: The directory containing the updated lock file - error: Any error that occurred during lock update
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
Example
dagger -m github.com/felipepimentel/daggerverse/python-poetry@658b3968b81bca69f2a0a561a8138cc63bfabf08 call \
lock --source DIR_PATH
func (m *myModule) example(source *Directory) *Directory {
return dag.
PythonPoetry().
Lock(source)
}
@function
def example(source: dagger.Directory) -> dagger.Directory:
return (
dag.python_poetry()
.lock(source)
)
@func()
example(source: Directory): Directory {
return dag
.pythonPoetry()
.lock(source)
}
update() 🔗
Update updates dependencies to their latest versions. Parameters: - ctx: The context for the operation - source: The source directory containing the Python project Returns: - *dagger.Directory: The directory with updated dependencies - error: Any error that occurred during update
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
Example
dagger -m github.com/felipepimentel/daggerverse/python-poetry@658b3968b81bca69f2a0a561a8138cc63bfabf08 call \
update --source DIR_PATH
func (m *myModule) example(source *Directory) *Directory {
return dag.
PythonPoetry().
Update(source)
}
@function
def example(source: dagger.Directory) -> dagger.Directory:
return (
dag.python_poetry()
.update(source)
)
@func()
example(source: Directory): Directory {
return dag
.pythonPoetry()
.update(source)
}