Dagger
Search

poetry

Package main provides functionality for managing Python projects with Poetry.

Installation

dagger install github.com/felipepimentel/daggerverse/libraries/poetry@v0.0.0

Entrypoint

Return Type
Poetry !
Example
func (m *myModule) example() *Poetry  {
	return dag.
			Poetry()
}

Types

Poetry 🔗

Poetry 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
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
Example
func (m *myModule) example(source *Directory) *Directory  {
	return dag.
			Poetry().
			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
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
Example
func (m *myModule) example(source *Directory) *Directory  {
	return dag.
			Poetry().
			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
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
Example
func (m *myModule) example(ctx context.Context, source *Directory) string  {
	return dag.
			Poetry().
			Test(ctx, 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
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
Example
func (m *myModule) example(source *Directory) *Directory  {
	return dag.
			Poetry().
			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
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
Example
func (m *myModule) example(source *Directory) *Directory  {
	return dag.
			Poetry().
			Update(source)
}