Dagger
Search

python

Python programming language module.

Installation

dagger install github.com/sagikazarmark/daggerverse/python@7fc77a4f8dd54d4d4c56e40517f7109e8585bcdd

Entrypoint

Return Type
Python !
Arguments
NameTypeDescription
versionString Version (image tag) to use from the official image repository as a base container.
containerContainer Custom container to use as a base container.
Example
dagger -m github.com/sagikazarmark/daggerverse/python@7fc77a4f8dd54d4d4c56e40517f7109e8585bcdd call \
func (m *myModule) example() *Python  {
	return dag.
			Python()
}
@function
def example() -> dag.Python:
	return (
		dag.python()
	)
@func()
example(): Python {
	return dag
		.python()
}

Types

Python 🔗

container() 🔗

Return Type
Container !
Example
dagger -m github.com/sagikazarmark/daggerverse/python@7fc77a4f8dd54d4d4c56e40517f7109e8585bcdd call \
 container
func (m *myModule) example() *Container  {
	return dag.
			Python().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.python()
		.container()
	)
@func()
example(): Container {
	return dag
		.python()
		.container()
}

withPipCache() 🔗

Mount a cache volume for Pip cache.

Return Type
Python !
Arguments
NameTypeDefault ValueDescription
cacheCacheVolume !-No description provided
sourceDirectory -Identifier of the directory to use as the cache volume's root.
sharingEnum -Sharing mode of the cache volume.
Example
dagger -m github.com/sagikazarmark/daggerverse/python@7fc77a4f8dd54d4d4c56e40517f7109e8585bcdd call \
 with-pip-cache --cache VOLUME_NAME
func (m *myModule) example(cache *CacheVolume) *Python  {
	return dag.
			Python().
			WithPipCache(cache)
}
@function
def example(cache: dagger.CacheVolume) -> dag.Python:
	return (
		dag.python()
		.with_pip_cache(cache)
	)
@func()
example(cache: CacheVolume): Python {
	return dag
		.python()
		.withPipCache(cache)
}

withSource() 🔗

Mount a source directory.

Return Type
Python !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-Source directory to mount.
Example
dagger -m github.com/sagikazarmark/daggerverse/python@7fc77a4f8dd54d4d4c56e40517f7109e8585bcdd call \
 with-source --source DIR_PATH
func (m *myModule) example(source *Directory) *Python  {
	return dag.
			Python().
			WithSource(source)
}
@function
def example(source: dagger.Directory) -> dag.Python:
	return (
		dag.python()
		.with_source(source)
	)
@func()
example(source: Directory): Python {
	return dag
		.python()
		.withSource(source)
}