python-sdk
No long description provided.
Installation
dagger install github.com/dagger/python-sdk@aad645358f3818761188979c3a769ebe74416e90Entrypoint
Return Type
PythonSdk !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| skipGenerateFilename | String | - | Marker filename that skips generate when found at or above a Python SDK module root. |
Example
dagger -m github.com/dagger/python-sdk@aad645358f3818761188979c3a769ebe74416e90 call \
func (m *MyModule) Example() *dagger.PythonSdk {
return dag.
PythonSdk()
}@function
def example() -> dagger.PythonSdk:
return (
dag.python_sdk()
)@func()
example(): PythonSdk {
return dag
.pythonSdk()
}Entrypoint
Return Type
PythonSdkModDeps !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| path | String ! | - | Workspace-relative path of the module root. |
| ws | Workspace | - | The workspace this module belongs to. |
Example
dagger -m github.com/dagger/python-sdk@aad645358f3818761188979c3a769ebe74416e90 call \
--path stringfunc (m *MyModule) Example(path string) *dagger.PythonSdkModDeps {
return dag.
PythonSdk(path)
}@function
def example(path: str, ) -> dagger.PythonSdkModDeps:
return (
dag.python_sdk(path)
)@func()
example(path: string, ): PythonSdkModDeps {
return dag
.pythonSdk(path)
}Entrypoint
Return Type
PythonSdkModEngine !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| path | String ! | - | Workspace-relative path of the module root. |
| ws | Workspace | - | The workspace this module belongs to. |
Example
dagger -m github.com/dagger/python-sdk@aad645358f3818761188979c3a769ebe74416e90 call \
--path stringfunc (m *MyModule) Example(path string) *dagger.PythonSdkModEngine {
return dag.
PythonSdk(path)
}@function
def example(path: str, ) -> dagger.PythonSdkModEngine:
return (
dag.python_sdk(path)
)@func()
example(path: string, ): PythonSdkModEngine {
return dag
.pythonSdk(path)
}Entrypoint
Return Type
PythonSdkTemplate !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String ! | - | Template name passed to init. |
| source | Directory ! | - | Template source files materialized into the new module before generation. |
Example
Function PythonSdkTemplate.Constructor is not accessible from the python-sdk moduleFunction PythonSdkTemplate.Constructor is not accessible from the python-sdk moduleFunction PythonSdkTemplate.Constructor is not accessible from the python-sdk moduleFunction PythonSdkTemplate.Constructor is not accessible from the python-sdk moduleEntrypoint
Return Type
PythonSdkMod !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| path | String ! | - | Workspace-relative path of this module root. |
| ws | Workspace | - | The workspace this module belongs to. |
| skipGenerateFilename | String ! | - | Marker filename that skips generate when found at or above this module root. |
Example
dagger -m github.com/dagger/python-sdk@aad645358f3818761188979c3a769ebe74416e90 call \
--path string --skip-generate-filename stringfunc (m *MyModule) Example(path string, skipGenerateFilename string) *dagger.PythonSdkMod {
return dag.
PythonSdk(path, skipGenerateFilename)
}@function
def example(path: str, skip_generate_filename: str) -> dagger.PythonSdkMod:
return (
dag.python_sdk(path, skip_generate_filename)
)@func()
example(path: string, skipGenerateFilename: string): PythonSdkMod {
return dag
.pythonSdk(path, skipGenerateFilename)
}Types
PythonSdk 🔗
Manage Dagger modules that use the Python SDK.
skipGenerateFilename() 🔗
Marker filename that skips generate when found at or above a Python SDK module root.
Return Type
String ! Example
dagger -m github.com/dagger/python-sdk@aad645358f3818761188979c3a769ebe74416e90 call \
skip-generate-filenamefunc (m *MyModule) Example(ctx context.Context) string {
return dag.
PythonSdk().
SkipGenerateFilename(ctx)
}@function
async def example() -> str:
return await (
dag.python_sdk()
.skip_generate_filename()
)@func()
async example(): Promise<string> {
return dag
.pythonSdk()
.skipGenerateFilename()
}modules() 🔗
Return every Dagger module whose sdk.source is “python”.
Return Type
[PythonSdkMod ! ] !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example() []*dagger.PythonSdkMod {
return dag.
PythonSdk().
Modules()
}@function
def example() -> List[dagger.PythonSdkMod]:
return (
dag.python_sdk()
.modules()
)@func()
example(): PythonSdkMod[] {
return dag
.pythonSdk()
.modules()
}templates() 🔗
Return init templates tracked by this module.
Templates live under templates/ and are materialized into the new module before generation. Passing an empty template to init uses the module default.
Return Type
[PythonSdkTemplate ! ] ! Example
dagger -m github.com/dagger/python-sdk@aad645358f3818761188979c3a769ebe74416e90 call \
templatesfunc (m *MyModule) Example() []*dagger.PythonSdkTemplate {
return dag.
PythonSdk().
Templates()
}@function
def example() -> List[dagger.PythonSdkTemplate]:
return (
dag.python_sdk()
.templates()
)@func()
example(): PythonSdkTemplate[] {
return dag
.pythonSdk()
.templates()
}mod() 🔗
Return the Python SDK module at or above a workspace path.
When findUp is true, path may point inside the module.
Return Type
PythonSdkMod !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
| path | String | - | No description provided |
| findUp | Boolean | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example() *dagger.PythonSdkMod {
return dag.
PythonSdk().
Mod()
}@function
def example() -> dagger.PythonSdkMod:
return (
dag.python_sdk()
.mod()
)@func()
example(): PythonSdkMod {
return dag
.pythonSdk()
.mod()
}init() 🔗
Create a new Python SDK Dagger module and return the files to write.
By default, the new module is created under the nearest .dagger directory
visible from the current workspace path:
/modules/
Pass path to choose a different module location. The target path must not
already contain a Dagger module.
Pass template to materialize files from templates/. The empty
default uses this module’s minimal template.
By default, future generated SDK files are checked into version control. Pass
ignoreGenerated to configure generation to add generated SDK paths to
.gitignore instead.
Return Type
Changeset !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
| name | String ! | - | No description provided |
| path | String | - | No description provided |
| template | String | - | No description provided |
| ignoreGenerated | Boolean | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(name string) *dagger.Changeset {
return dag.
PythonSdk().
Init(name)
}@function
def example(name: str) -> dagger.Changeset:
return (
dag.python_sdk()
.init(name)
)@func()
example(name: string): Changeset {
return dag
.pythonSdk()
.init(name)
}generateAll() 🔗
Generate all discovered Python SDK modules. Modules with the generate skip marker are skipped.
Return Type
Changeset !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example() *dagger.Changeset {
return dag.
PythonSdk().
GenerateAll()
}@function
def example() -> dagger.Changeset:
return (
dag.python_sdk()
.generate_all()
)@func()
example(): Changeset {
return dag
.pythonSdk()
.generateAll()
}PythonSdkModDeps 🔗
Dagger dependencies for a Python SDK module.
list() 🔗
Return dependency names when present, otherwise dependency sources.
Return Type
[String ! ] ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context) []string {
return dag.
PythonSdk().
Mod().
Deps().
List(ctx)
}@function
async def example() -> List[str]:
return await (
dag.python_sdk()
.mod()
.deps()
.list()
)@func()
async example(): Promise<string[]> {
return dag
.pythonSdk()
.mod()
.deps()
.list()
}add() 🔗
Add a Dagger dependency to dagger.json.
Return Type
Changeset !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | String ! | - | No description provided |
| name | String | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(source string) *dagger.Changeset {
return dag.
PythonSdk().
Mod().
Deps().
Add(source)
}@function
def example(source: str) -> dagger.Changeset:
return (
dag.python_sdk()
.mod()
.deps()
.add(source)
)@func()
example(source: string): Changeset {
return dag
.pythonSdk()
.mod()
.deps()
.add(source)
}remove() 🔗
Remove a Dagger dependency from dagger.json by name or source.
Return Type
Changeset !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(name string) *dagger.Changeset {
return dag.
PythonSdk().
Mod().
Deps().
Remove(name)
}@function
def example(name: str) -> dagger.Changeset:
return (
dag.python_sdk()
.mod()
.deps()
.remove(name)
)@func()
example(name: string): Changeset {
return dag
.pythonSdk()
.mod()
.deps()
.remove(name)
}update() 🔗
Update one dependency by name or source, or update all remote dependencies in dagger.json.
Return Type
Changeset !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example() *dagger.Changeset {
return dag.
PythonSdk().
Mod().
Deps().
Update()
}@function
def example() -> dagger.Changeset:
return (
dag.python_sdk()
.mod()
.deps()
.update()
)@func()
example(): Changeset {
return dag
.pythonSdk()
.mod()
.deps()
.update()
}PythonSdkModEngine 🔗
Required Dagger engine version for a Python SDK module.
require() 🔗
Configure this module to require the given Dagger engine version.
Return Type
Changeset !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(version string) *dagger.Changeset {
return dag.
PythonSdk().
Mod().
Engine().
Require(version)
}@function
def example(version: str) -> dagger.Changeset:
return (
dag.python_sdk()
.mod()
.engine()
.require(version)
)@func()
example(version: string): Changeset {
return dag
.pythonSdk()
.mod()
.engine()
.require(version)
}requireCurrent() 🔗
Configure this module to require the current Dagger engine version.
Return Type
Changeset ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example() *dagger.Changeset {
return dag.
PythonSdk().
Mod().
Engine().
RequireCurrent()
}@function
def example() -> dagger.Changeset:
return (
dag.python_sdk()
.mod()
.engine()
.require_current()
)@func()
example(): Changeset {
return dag
.pythonSdk()
.mod()
.engine()
.requireCurrent()
}requireLatest() 🔗
Configure this module to require the latest stable Dagger engine version.
Return Type
Changeset ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example() *dagger.Changeset {
return dag.
PythonSdk().
Mod().
Engine().
RequireLatest()
}@function
def example() -> dagger.Changeset:
return (
dag.python_sdk()
.mod()
.engine()
.require_latest()
)@func()
example(): Changeset {
return dag
.pythonSdk()
.mod()
.engine()
.requireLatest()
}required() 🔗
The Dagger engine version required by this module, without a leading “v”.
Return Type
String ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context) string {
return dag.
PythonSdk().
Mod().
Engine().
Required(ctx)
}@function
async def example() -> str:
return await (
dag.python_sdk()
.mod()
.engine()
.required()
)@func()
async example(): Promise<string> {
return dag
.pythonSdk()
.mod()
.engine()
.required()
}PythonSdkTemplate 🔗
An init template tracked by this module.
name() 🔗
Template name passed to init.
Return Type
String ! Example
Function PythonSdkTemplate.name is not accessible from the python-sdk moduleFunction PythonSdkTemplate.name is not accessible from the python-sdk moduleFunction PythonSdkTemplate.name is not accessible from the python-sdk moduleFunction PythonSdkTemplate.name is not accessible from the python-sdk modulesource() 🔗
Template source files materialized into the new module before generation.
Return Type
Directory ! Example
Function PythonSdkTemplate.source is not accessible from the python-sdk moduleFunction PythonSdkTemplate.source is not accessible from the python-sdk moduleFunction PythonSdkTemplate.source is not accessible from the python-sdk moduleFunction PythonSdkTemplate.source is not accessible from the python-sdk modulePythonSdkMod 🔗
A Dagger module that uses the Python SDK.
path() 🔗
Workspace-relative path of this module root.
Return Type
String ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context) string {
return dag.
PythonSdk().
Mod().
Path(ctx)
}@function
async def example() -> str:
return await (
dag.python_sdk()
.mod()
.path()
)@func()
async example(): Promise<string> {
return dag
.pythonSdk()
.mod()
.path()
}skipGenerate() 🔗
Whether this module or an ancestor contains the configured generate skip marker.
Return Type
Boolean ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context) bool {
return dag.
PythonSdk().
Mod().
SkipGenerate(ctx)
}@function
async def example() -> bool:
return await (
dag.python_sdk()
.mod()
.skip_generate()
)@func()
async example(): Promise<boolean> {
return dag
.pythonSdk()
.mod()
.skipGenerate()
}deps() 🔗
Manage this module’s Dagger dependencies.
Return Type
PythonSdkModDeps ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example() *dagger.PythonSdkModDeps {
return dag.
PythonSdk().
Mod().
Deps()
}@function
def example() -> dagger.PythonSdkModDeps:
return (
dag.python_sdk()
.mod()
.deps()
)@func()
example(): PythonSdkModDeps {
return dag
.pythonSdk()
.mod()
.deps()
}engine() 🔗
Manage the Dagger engine version required by this module.
Return Type
PythonSdkModEngine ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example() *dagger.PythonSdkModEngine {
return dag.
PythonSdk().
Mod().
Engine()
}@function
def example() -> dagger.PythonSdkModEngine:
return (
dag.python_sdk()
.mod()
.engine()
)@func()
example(): PythonSdkModEngine {
return dag
.pythonSdk()
.mod()
.engine()
}generate() 🔗
Generate this module. If the generate skip marker is present, the changeset is empty.
Return Type
Changeset ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example() *dagger.Changeset {
return dag.
PythonSdk().
Mod().
Generate()
}@function
def example() -> dagger.Changeset:
return (
dag.python_sdk()
.mod()
.generate()
)@func()
example(): Changeset {
return dag
.pythonSdk()
.mod()
.generate()
}