python
No long description provided.
Installation
dagger install github.com/felipepimentel/daggerverse/python@v1.3.0
Entrypoint
Return Type
Python
Example
dagger -m github.com/felipepimentel/daggerverse/python@67317b07f17b0f6a9343dfb90435f315dfd1b410 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 🔗
Python represents a Python module with Poetry support
pythonVersion() 🔗
PythonVersion specifies the Python version to use (default: “3.12”)
Return Type
String !
Example
dagger -m github.com/felipepimentel/daggerverse/python@67317b07f17b0f6a9343dfb90435f315dfd1b410 call \
python-version
func (m *myModule) example(ctx context.Context) string {
return dag.
Python().
PythonVersion(ctx)
}
@function
async def example() -> str:
return await (
dag.python()
.python_version()
)
@func()
async example(): Promise<string> {
return dag
.python()
.pythonVersion()
}
packagePath() 🔗
PackagePath specifies the path to the package within the source (default: “.”)
Return Type
String !
Example
dagger -m github.com/felipepimentel/daggerverse/python@67317b07f17b0f6a9343dfb90435f315dfd1b410 call \
package-path
func (m *myModule) example(ctx context.Context) string {
return dag.
Python().
PackagePath(ctx)
}
@function
async def example() -> str:
return await (
dag.python()
.package_path()
)
@func()
async example(): Promise<string> {
return dag
.python()
.packagePath()
}
pyPiconfig() 🔗
PyPIConfig holds the PyPI deployment configuration
Return Type
PyPiconfig !
Example
dagger -m github.com/felipepimentel/daggerverse/python@67317b07f17b0f6a9343dfb90435f315dfd1b410 call \
py-piconfig
func (m *myModule) example() *PythonPyPiconfig {
return dag.
Python().
PyPiconfig()
}
@function
def example() -> dag.PythonPyPiconfig:
return (
dag.python()
.py_piconfig()
)
@func()
example(): PythonPyPiconfig {
return dag
.python()
.pyPiconfig()
}
testConfig() 🔗
TestConfig holds the test configuration
Return Type
TestConfig !
Example
dagger -m github.com/felipepimentel/daggerverse/python@67317b07f17b0f6a9343dfb90435f315dfd1b410 call \
test-config
func (m *myModule) example() *PythonTestConfig {
return dag.
Python().
TestConfig()
}
@function
def example() -> dag.PythonTestConfig:
return (
dag.python()
.test_config()
)
@func()
example(): PythonTestConfig {
return dag
.python()
.testConfig()
}
buildConfig() 🔗
BuildConfig holds the build configuration
Return Type
BuildConfig !
Example
dagger -m github.com/felipepimentel/daggerverse/python@67317b07f17b0f6a9343dfb90435f315dfd1b410 call \
build-config
func (m *myModule) example() *PythonBuildConfig {
return dag.
Python().
BuildConfig()
}
@function
def example() -> dag.PythonBuildConfig:
return (
dag.python()
.build_config()
)
@func()
example(): PythonBuildConfig {
return dag
.python()
.buildConfig()
}
withPythonVersion() 🔗
WithPythonVersion sets the Python version to use
Return Type
Python !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
version | String ! | - | No description provided |
Example
dagger -m github.com/felipepimentel/daggerverse/python@67317b07f17b0f6a9343dfb90435f315dfd1b410 call \
with-python-version --version string
func (m *myModule) example(version string) *Python {
return dag.
Python().
WithPythonVersion(version)
}
@function
def example(version: str) -> dag.Python:
return (
dag.python()
.with_python_version(version)
)
@func()
example(version: string): Python {
return dag
.python()
.withPythonVersion(version)
}
withPackagePath() 🔗
WithPackagePath sets the package path within the source
Return Type
Python !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
path | String ! | - | No description provided |
Example
dagger -m github.com/felipepimentel/daggerverse/python@67317b07f17b0f6a9343dfb90435f315dfd1b410 call \
with-package-path --path string
func (m *myModule) example(path string) *Python {
return dag.
Python().
WithPackagePath(path)
}
@function
def example(path: str) -> dag.Python:
return (
dag.python()
.with_package_path(path)
)
@func()
example(path: string): Python {
return dag
.python()
.withPackagePath(path)
}
withPyPiconfig() 🔗
WithPyPIConfig sets the PyPI deployment configuration
Return Type
Python !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
config | PyPiconfig ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'
func (m *myModule) example(config *PythonPyPiconfig) *Python {
return dag.
Python().
WithPyPiconfig(config)
}
@function
def example(config: dag.PythonPyPiconfig) -> dag.Python:
return (
dag.python()
.with_py_piconfig(config)
)
@func()
example(config: PythonPyPiconfig): Python {
return dag
.python()
.withPyPiconfig(config)
}
withTestConfig() 🔗
WithTestConfig sets the test configuration
Return Type
Python !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
config | TestConfig ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'
func (m *myModule) example(config *PythonTestConfig) *Python {
return dag.
Python().
WithTestConfig(config)
}
@function
def example(config: dag.PythonTestConfig) -> dag.Python:
return (
dag.python()
.with_test_config(config)
)
@func()
example(config: PythonTestConfig): Python {
return dag
.python()
.withTestConfig(config)
}
withBuildConfig() 🔗
WithBuildConfig sets the build configuration
Return Type
Python !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
config | BuildConfig ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'
func (m *myModule) example(config *PythonBuildConfig) *Python {
return dag.
Python().
WithBuildConfig(config)
}
@function
def example(config: dag.PythonBuildConfig) -> dag.Python:
return (
dag.python()
.with_build_config(config)
)
@func()
example(config: PythonBuildConfig): Python {
return dag
.python()
.withBuildConfig(config)
}
publish() 🔗
Publish builds, tests and publishes the Python package to a registry
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
token | Secret ! | - | No description provided |
Example
dagger -m github.com/felipepimentel/daggerverse/python@67317b07f17b0f6a9343dfb90435f315dfd1b410 call \
publish --source DIR_PATH --token env:MYSECRET
func (m *myModule) example(ctx context.Context, source *Directory, token *Secret) string {
return dag.
Python().
Publish(ctx, source, token)
}
@function
async def example(source: dagger.Directory, token: dagger.Secret) -> str:
return await (
dag.python()
.publish(source, token)
)
@func()
async example(source: Directory, token: Secret): Promise<string> {
return dag
.python()
.publish(source, token)
}
build() 🔗
Build creates a Python package using Poetry
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
Example
dagger -m github.com/felipepimentel/daggerverse/python@67317b07f17b0f6a9343dfb90435f315dfd1b410 call \
build --source DIR_PATH
func (m *myModule) example(source *Directory) *Container {
return dag.
Python().
Build(source)
}
@function
def example(source: dagger.Directory) -> dagger.Container:
return (
dag.python()
.build(source)
)
@func()
example(source: Directory): Container {
return dag
.python()
.build(source)
}
test() 🔗
Test runs the test suite using pytest with coverage reporting
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
Example
dagger -m github.com/felipepimentel/daggerverse/python@67317b07f17b0f6a9343dfb90435f315dfd1b410 call \
test --source DIR_PATH
func (m *myModule) example(ctx context.Context, source *Directory) string {
return dag.
Python().
Test(ctx, source)
}
@function
async def example(source: dagger.Directory) -> str:
return await (
dag.python()
.test(source)
)
@func()
async example(source: Directory): Promise<string> {
return dag
.python()
.test(source)
}
buildEnv() 🔗
BuildEnv prepares a Python development environment with Poetry
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
Example
dagger -m github.com/felipepimentel/daggerverse/python@67317b07f17b0f6a9343dfb90435f315dfd1b410 call \
build-env --source DIR_PATH
func (m *myModule) example(source *Directory) *Container {
return dag.
Python().
BuildEnv(source)
}
@function
def example(source: dagger.Directory) -> dagger.Container:
return (
dag.python()
.build_env(source)
)
@func()
example(source: Directory): Container {
return dag
.python()
.buildEnv(source)
}
PyPiconfig 🔗
PyPIConfig holds PyPI deployment configuration
registry() 🔗
Registry URL (default: https://upload.pypi.org/legacy/)
Return Type
String !
Example
Function PythonPyPiconfig.registry is not accessible from the python module
Function PythonPyPiconfig.registry is not accessible from the python module
Function PythonPyPiconfig.registry is not accessible from the python module
Function PythonPyPiconfig.registry is not accessible from the python module
token() 🔗
Token for authentication
Return Type
Secret !
Example
Function PythonPyPiconfig.token is not accessible from the python module
Function PythonPyPiconfig.token is not accessible from the python module
Function PythonPyPiconfig.token is not accessible from the python module
Function PythonPyPiconfig.token is not accessible from the python module
skipExisting() 🔗
Skip existing versions (default: false)
Return Type
Boolean !
Example
Function PythonPyPiconfig.skipExisting is not accessible from the python module
Function PythonPyPiconfig.skipExisting is not accessible from the python module
Function PythonPyPiconfig.skipExisting is not accessible from the python module
Function PythonPyPiconfig.skipExisting is not accessible from the python module
allowDirty() 🔗
Allow dirty versions (default: false)
Return Type
Boolean !
Example
Function PythonPyPiconfig.allowDirty is not accessible from the python module
Function PythonPyPiconfig.allowDirty is not accessible from the python module
Function PythonPyPiconfig.allowDirty is not accessible from the python module
Function PythonPyPiconfig.allowDirty is not accessible from the python module
extraArgs() 🔗
Additional publish arguments
Return Type
[String ! ] !
Example
Function PythonPyPiconfig.extraArgs is not accessible from the python module
Function PythonPyPiconfig.extraArgs is not accessible from the python module
Function PythonPyPiconfig.extraArgs is not accessible from the python module
Function PythonPyPiconfig.extraArgs is not accessible from the python module
env() 🔗
Environment variables for publishing
Return Type
[KeyValue ! ] !
Example
Function PythonPyPiconfig.env is not accessible from the python module
Function PythonPyPiconfig.env is not accessible from the python module
Function PythonPyPiconfig.env is not accessible from the python module
Function PythonPyPiconfig.env is not accessible from the python module
repositoryName() 🔗
Repository name in Poetry config (default: “pypi”)
Return Type
String !
Example
Function PythonPyPiconfig.repositoryName is not accessible from the python module
Function PythonPyPiconfig.repositoryName is not accessible from the python module
Function PythonPyPiconfig.repositoryName is not accessible from the python module
Function PythonPyPiconfig.repositoryName is not accessible from the python module
skipBuild() 🔗
Skip build before publishing (default: false)
Return Type
Boolean !
Example
Function PythonPyPiconfig.skipBuild is not accessible from the python module
Function PythonPyPiconfig.skipBuild is not accessible from the python module
Function PythonPyPiconfig.skipBuild is not accessible from the python module
Function PythonPyPiconfig.skipBuild is not accessible from the python module
skipVerify() 🔗
Skip verification before publishing (default: false)
Return Type
Boolean !
Example
Function PythonPyPiconfig.skipVerify is not accessible from the python module
Function PythonPyPiconfig.skipVerify is not accessible from the python module
Function PythonPyPiconfig.skipVerify is not accessible from the python module
Function PythonPyPiconfig.skipVerify is not accessible from the python module
TestConfig 🔗
TestConfig holds pytest configuration options
verbose() 🔗
Verbose output (default: true)
Return Type
Boolean !
Example
Function PythonTestConfig.verbose is not accessible from the python module
Function PythonTestConfig.verbose is not accessible from the python module
Function PythonTestConfig.verbose is not accessible from the python module
Function PythonTestConfig.verbose is not accessible from the python module
workers() 🔗
Number of parallel workers (default: auto)
Return Type
Integer !
Example
Function PythonTestConfig.workers is not accessible from the python module
Function PythonTestConfig.workers is not accessible from the python module
Function PythonTestConfig.workers is not accessible from the python module
Function PythonTestConfig.workers is not accessible from the python module
coverage() 🔗
Coverage configuration
Return Type
CoverageConfig !
Example
Function PythonTestConfig.coverage is not accessible from the python module
Function PythonTestConfig.coverage is not accessible from the python module
Function PythonTestConfig.coverage is not accessible from the python module
Function PythonTestConfig.coverage is not accessible from the python module
extraArgs() 🔗
Additional pytest arguments
Return Type
[String ! ] !
Example
Function PythonTestConfig.extraArgs is not accessible from the python module
Function PythonTestConfig.extraArgs is not accessible from the python module
Function PythonTestConfig.extraArgs is not accessible from the python module
Function PythonTestConfig.extraArgs is not accessible from the python module
env() 🔗
Environment variables for tests
Return Type
[KeyValue ! ] !
Example
Function PythonTestConfig.env is not accessible from the python module
Function PythonTestConfig.env is not accessible from the python module
Function PythonTestConfig.env is not accessible from the python module
Function PythonTestConfig.env is not accessible from the python module
markers() 🔗
Test markers to select
Return Type
[String ! ] !
Example
Function PythonTestConfig.markers is not accessible from the python module
Function PythonTestConfig.markers is not accessible from the python module
Function PythonTestConfig.markers is not accessible from the python module
Function PythonTestConfig.markers is not accessible from the python module
testPaths() 🔗
Test paths to run (default: “.”)
Return Type
[String ! ] !
Example
Function PythonTestConfig.testPaths is not accessible from the python module
Function PythonTestConfig.testPaths is not accessible from the python module
Function PythonTestConfig.testPaths is not accessible from the python module
Function PythonTestConfig.testPaths is not accessible from the python module
skipInstall() 🔗
Skip installing test dependencies (default: false)
Return Type
Boolean !
Example
Function PythonTestConfig.skipInstall is not accessible from the python module
Function PythonTestConfig.skipInstall is not accessible from the python module
Function PythonTestConfig.skipInstall is not accessible from the python module
Function PythonTestConfig.skipInstall is not accessible from the python module
junitXml() 🔗
JUnit XML report path
Return Type
String !
Example
Function PythonTestConfig.junitXml is not accessible from the python module
Function PythonTestConfig.junitXml is not accessible from the python module
Function PythonTestConfig.junitXml is not accessible from the python module
Function PythonTestConfig.junitXml is not accessible from the python module
maxTestTime() 🔗
Maximum test duration in seconds (0 for no limit)
Return Type
Integer !
Example
Function PythonTestConfig.maxTestTime is not accessible from the python module
Function PythonTestConfig.maxTestTime is not accessible from the python module
Function PythonTestConfig.maxTestTime is not accessible from the python module
Function PythonTestConfig.maxTestTime is not accessible from the python module
failFast() 🔗
Stop on first failure (default: false)
Return Type
Boolean !
Example
Function PythonTestConfig.failFast is not accessible from the python module
Function PythonTestConfig.failFast is not accessible from the python module
Function PythonTestConfig.failFast is not accessible from the python module
Function PythonTestConfig.failFast is not accessible from the python module
BuildConfig 🔗
BuildConfig holds Poetry build configuration
buildArgs() 🔗
Additional build arguments
Return Type
[String ! ] !
Example
Function PythonBuildConfig.buildArgs is not accessible from the python module
Function PythonBuildConfig.buildArgs is not accessible from the python module
Function PythonBuildConfig.buildArgs is not accessible from the python module
Function PythonBuildConfig.buildArgs is not accessible from the python module
extraDependencies() 🔗
Additional dependencies to install
Return Type
[String ! ] !
Example
Function PythonBuildConfig.extraDependencies is not accessible from the python module
Function PythonBuildConfig.extraDependencies is not accessible from the python module
Function PythonBuildConfig.extraDependencies is not accessible from the python module
Function PythonBuildConfig.extraDependencies is not accessible from the python module
poetryConfig() 🔗
Poetry configuration options
Return Type
[KeyValue ! ] !
Example
Function PythonBuildConfig.poetryConfig is not accessible from the python module
Function PythonBuildConfig.poetryConfig is not accessible from the python module
Function PythonBuildConfig.poetryConfig is not accessible from the python module
Function PythonBuildConfig.poetryConfig is not accessible from the python module
env() 🔗
Environment variables for build
Return Type
[KeyValue ! ] !
Example
Function PythonBuildConfig.env is not accessible from the python module
Function PythonBuildConfig.env is not accessible from the python module
Function PythonBuildConfig.env is not accessible from the python module
Function PythonBuildConfig.env is not accessible from the python module
cache() 🔗
Cache configuration
Return Type
CacheConfig !
Example
Function PythonBuildConfig.cache is not accessible from the python module
Function PythonBuildConfig.cache is not accessible from the python module
Function PythonBuildConfig.cache is not accessible from the python module
Function PythonBuildConfig.cache is not accessible from the python module
dependencyGroups() 🔗
Poetry dependency groups to install (default: [“dev”])
Return Type
[String ! ] !
Example
Function PythonBuildConfig.dependencyGroups is not accessible from the python module
Function PythonBuildConfig.dependencyGroups is not accessible from the python module
Function PythonBuildConfig.dependencyGroups is not accessible from the python module
Function PythonBuildConfig.dependencyGroups is not accessible from the python module
optionalDependencies() 🔗
Poetry optional dependencies to install
Return Type
[String ! ] !
Example
Function PythonBuildConfig.optionalDependencies is not accessible from the python module
Function PythonBuildConfig.optionalDependencies is not accessible from the python module
Function PythonBuildConfig.optionalDependencies is not accessible from the python module
Function PythonBuildConfig.optionalDependencies is not accessible from the python module
skipDependencies() 🔗
Skip installing dependencies (default: false)
Return Type
Boolean !
Example
Function PythonBuildConfig.skipDependencies is not accessible from the python module
Function PythonBuildConfig.skipDependencies is not accessible from the python module
Function PythonBuildConfig.skipDependencies is not accessible from the python module
Function PythonBuildConfig.skipDependencies is not accessible from the python module
onlyGroups() 🔗
Install only selected dependency groups (default: false)
Return Type
Boolean !
Example
Function PythonBuildConfig.onlyGroups is not accessible from the python module
Function PythonBuildConfig.onlyGroups is not accessible from the python module
Function PythonBuildConfig.onlyGroups is not accessible from the python module
Function PythonBuildConfig.onlyGroups is not accessible from the python module
skipRoot() 🔗
Skip installing the root package (default: true)
Return Type
Boolean !
Example
Function PythonBuildConfig.skipRoot is not accessible from the python module
Function PythonBuildConfig.skipRoot is not accessible from the python module
Function PythonBuildConfig.skipRoot is not accessible from the python module
Function PythonBuildConfig.skipRoot is not accessible from the python module
KeyValue 🔗
KeyValue represents a key-value pair
key() 🔗
Return Type
String !
Example
Function PythonKeyValue.key is not accessible from the python module
Function PythonKeyValue.key is not accessible from the python module
Function PythonKeyValue.key is not accessible from the python module
Function PythonKeyValue.key is not accessible from the python module
value() 🔗
Return Type
String !
Example
Function PythonKeyValue.value is not accessible from the python module
Function PythonKeyValue.value is not accessible from the python module
Function PythonKeyValue.value is not accessible from the python module
Function PythonKeyValue.value is not accessible from the python module
CoverageConfig 🔗
CoverageConfig holds coverage reporting configuration
enabled() 🔗
Enable coverage reporting (default: true)
Return Type
Boolean !
Example
Function PythonCoverageConfig.enabled is not accessible from the python module
Function PythonCoverageConfig.enabled is not accessible from the python module
Function PythonCoverageConfig.enabled is not accessible from the python module
Function PythonCoverageConfig.enabled is not accessible from the python module
formats() 🔗
Coverage report formats (default: [“term”, “xml”])
Return Type
[String ! ] !
Example
Function PythonCoverageConfig.formats is not accessible from the python module
Function PythonCoverageConfig.formats is not accessible from the python module
Function PythonCoverageConfig.formats is not accessible from the python module
Function PythonCoverageConfig.formats is not accessible from the python module
minCoverage() 🔗
Minimum coverage percentage (default: 0)
Return Type
Integer !
Example
Function PythonCoverageConfig.minCoverage is not accessible from the python module
Function PythonCoverageConfig.minCoverage is not accessible from the python module
Function PythonCoverageConfig.minCoverage is not accessible from the python module
Function PythonCoverageConfig.minCoverage is not accessible from the python module
outputDir() 🔗
Coverage output directory (default: “coverage”)
Return Type
String !
Example
Function PythonCoverageConfig.outputDir is not accessible from the python module
Function PythonCoverageConfig.outputDir is not accessible from the python module
Function PythonCoverageConfig.outputDir is not accessible from the python module
Function PythonCoverageConfig.outputDir is not accessible from the python module
include() 🔗
Paths to include in coverage
Return Type
[String ! ] !
Example
Function PythonCoverageConfig.include is not accessible from the python module
Function PythonCoverageConfig.include is not accessible from the python module
Function PythonCoverageConfig.include is not accessible from the python module
Function PythonCoverageConfig.include is not accessible from the python module
exclude() 🔗
Paths to exclude from coverage
Return Type
[String ! ] !
Example
Function PythonCoverageConfig.exclude is not accessible from the python module
Function PythonCoverageConfig.exclude is not accessible from the python module
Function PythonCoverageConfig.exclude is not accessible from the python module
Function PythonCoverageConfig.exclude is not accessible from the python module
showMissing() 🔗
Show missing lines in report (default: true)
Return Type
Boolean !
Example
Function PythonCoverageConfig.showMissing is not accessible from the python module
Function PythonCoverageConfig.showMissing is not accessible from the python module
Function PythonCoverageConfig.showMissing is not accessible from the python module
Function PythonCoverageConfig.showMissing is not accessible from the python module
branch() 🔗
Branch coverage (default: false)
Return Type
Boolean !
Example
Function PythonCoverageConfig.branch is not accessible from the python module
Function PythonCoverageConfig.branch is not accessible from the python module
Function PythonCoverageConfig.branch is not accessible from the python module
Function PythonCoverageConfig.branch is not accessible from the python module
context() 🔗
Context lines in report (default: 0)
Return Type
Integer !
Example
Function PythonCoverageConfig.context is not accessible from the python module
Function PythonCoverageConfig.context is not accessible from the python module
Function PythonCoverageConfig.context is not accessible from the python module
Function PythonCoverageConfig.context is not accessible from the python module
CacheConfig 🔗
CacheConfig holds cache configuration
pipCache() 🔗
Enable pip cache (default: true)
Return Type
Boolean !
Example
Function PythonCacheConfig.pipCache is not accessible from the python module
Function PythonCacheConfig.pipCache is not accessible from the python module
Function PythonCacheConfig.pipCache is not accessible from the python module
Function PythonCacheConfig.pipCache is not accessible from the python module
poetryCache() 🔗
Enable poetry cache (default: true)
Return Type
Boolean !
Example
Function PythonCacheConfig.poetryCache is not accessible from the python module
Function PythonCacheConfig.poetryCache is not accessible from the python module
Function PythonCacheConfig.poetryCache is not accessible from the python module
Function PythonCacheConfig.poetryCache is not accessible from the python module
pipCacheVolume() 🔗
Custom cache volume names
Return Type
String !
Example
Function PythonCacheConfig.pipCacheVolume is not accessible from the python module
Function PythonCacheConfig.pipCacheVolume is not accessible from the python module
Function PythonCacheConfig.pipCacheVolume is not accessible from the python module
Function PythonCacheConfig.pipCacheVolume is not accessible from the python module
poetryCacheVolume() 🔗
Return Type
String !
Example
Function PythonCacheConfig.poetryCacheVolume is not accessible from the python module
Function PythonCacheConfig.poetryCacheVolume is not accessible from the python module
Function PythonCacheConfig.poetryCacheVolume is not accessible from the python module
Function PythonCacheConfig.poetryCacheVolume is not accessible from the python module