python
This module has been generated via dagger init and serves as a reference to basic module structure as you get started with Dagger.Two functions have been pre-created. You can modify, delete, or add to them, as needed. They demonstrate usage of arguments and return types using simple echo and grep commands. The functions can be called from the dagger CLI or from one of the SDKs.
The first line in this comment block is a short description line and the rest is a long description with more detail on the module's purpose or usage, if appropriate. All modules should have a short description.
Installation
dagger install github.com/francoissharpe/daggerverse/python@38c6e115ca67ecd1c051f80866d4d660227a794aEntrypoint
Return Type
Python Example
dagger -m github.com/francoissharpe/daggerverse/python@38c6e115ca67ecd1c051f80866d4d660227a794a call \
func (m *MyModule) Example() *dagger.Python  {
	return dag.
			Python()
}@function
def example() -> dagger.Python:
	return (
		dag.python()
	)@func()
example(): Python {
	return dag
		.python()
}Types
Python 🔗
container() 🔗
Return Type
Container ! Example
dagger -m github.com/francoissharpe/daggerverse/python@38c6e115ca67ecd1c051f80866d4d660227a794a call \
 containerfunc (m *MyModule) Example() *dagger.Container  {
	return dag.
			Python().
			Container()
}@function
def example() -> dagger.Container:
	return (
		dag.python()
		.container()
	)@func()
example(): Container {
	return dag
		.python()
		.container()
}directory() 🔗
Directory Return the current working directory
Return Type
Directory ! Example
dagger -m github.com/francoissharpe/daggerverse/python@38c6e115ca67ecd1c051f80866d4d660227a794a call \
 directoryfunc (m *MyModule) Example() *dagger.Directory  {
	return dag.
			Python().
			Directory()
}@function
def example() -> dagger.Directory:
	return (
		dag.python()
		.directory()
	)@func()
example(): Directory {
	return dag
		.python()
		.directory()
}withPypaBuild() 🔗
Return Type
Directory !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| buildVersion | String | "1.2.1" | The version of the build package | 
| src | Directory ! | - | Directory containing the source code | 
Example
dagger -m github.com/francoissharpe/daggerverse/python@38c6e115ca67ecd1c051f80866d4d660227a794a call \
 with-pypa-build --src DIR_PATHfunc (m *MyModule) Example(src *dagger.Directory) *dagger.Directory  {
	return dag.
			Python().
			WithPypaBuild(src)
}@function
def example(src: dagger.Directory) -> dagger.Directory:
	return (
		dag.python()
		.with_pypa_build(src)
	)@func()
example(src: Directory): Directory {
	return dag
		.python()
		.withPypaBuild(src)
}do() 🔗
Return Type
String ! Example
dagger -m github.com/francoissharpe/daggerverse/python@38c6e115ca67ecd1c051f80866d4d660227a794a call \
 dofunc (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			Python().
			Do(ctx)
}@function
async def example() -> str:
	return await (
		dag.python()
		.do()
	)@func()
async example(): Promise<string> {
	return dag
		.python()
		.do()
}withTwineUpload() 🔗
Return Type
Python !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| twineVersion | String | "5.0.0" | The version of the build package | 
| dist | Directory ! | - | Directory containing the distribution files to upload to the repository | 
| repositoryUrl | String | "https://test.pypi.org/legacy/" | The repository (package index) URL to upload the package to | 
| username | Secret ! | - | The username to authenticate with the repository | 
| password | Secret ! | - | The password to authenticate with the repository | 
| bustCache | Boolean | false | Force execution of the step even if the cache is present | 
Example
dagger -m github.com/francoissharpe/daggerverse/python@38c6e115ca67ecd1c051f80866d4d660227a794a call \
 with-twine-upload --dist DIR_PATH --username env:MYSECRET --password env:MYSECRETfunc (m *MyModule) Example(dist *dagger.Directory, username *dagger.Secret, password *dagger.Secret) *dagger.Python  {
	return dag.
			Python().
			WithTwineUpload(dist, username, password)
}@function
def example(dist: dagger.Directory, username: dagger.Secret, password: dagger.Secret) -> dagger.Python:
	return (
		dag.python()
		.with_twine_upload(dist, username, password)
	)@func()
example(dist: Directory, username: Secret, password: Secret): Python {
	return dag
		.python()
		.withTwineUpload(dist, username, password)
}withVersion() 🔗
Return Type
Python !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| image | String | "python" | The image to use | 
| version | String ! | - | The version of Python to use | 
| packages | [String ! ] | [] | Additional APT packages to install | 
| cacheEnabled | Boolean | true | Enable caching for the container | 
| commands | [String ! ] | [] | Commands to run in the container | 
| caFile | File | null | CA File to use for SSL | 
| pipIndexUrl | String | "https://pypi.org/simple" | Pip index URL | 
| httpProxy | String | "" | http_proxy environment variable | 
| httpsProxy | String | "" | https_proxy environment variable | 
| noProxy | String | "" | no_proxy environment variable | 
Example
dagger -m github.com/francoissharpe/daggerverse/python@38c6e115ca67ecd1c051f80866d4d660227a794a call \
 with-version --version stringfunc (m *MyModule) Example(version string) *dagger.Python  {
	return dag.
			Python().
			WithVersion(version)
}@function
def example(version: str) -> dagger.Python:
	return (
		dag.python()
		.with_version(version)
	)@func()
example(version: string): Python {
	return dag
		.python()
		.withVersion(version)
}withPackageManager() 🔗
Return Type
Python !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| packageManager | String | "pip" | The package manager to use | 
Example
dagger -m github.com/francoissharpe/daggerverse/python@38c6e115ca67ecd1c051f80866d4d660227a794a call \
 with-package-managerfunc (m *MyModule) Example() *dagger.Python  {
	return dag.
			Python().
			WithPackageManager()
}@function
def example() -> dagger.Python:
	return (
		dag.python()
		.with_package_manager()
	)@func()
example(): Python {
	return dag
		.python()
		.withPackageManager()
}withPip() 🔗
Return Type
Python !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| version | String | "" | The version of pip to use | 
Example
dagger -m github.com/francoissharpe/daggerverse/python@38c6e115ca67ecd1c051f80866d4d660227a794a call \
 with-pipfunc (m *MyModule) Example() *dagger.Python  {
	return dag.
			Python().
			WithPip()
}@function
def example() -> dagger.Python:
	return (
		dag.python()
		.with_pip()
	)@func()
example(): Python {
	return dag
		.python()
		.withPip()
}withPoetry() 🔗
Return Type
Python !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| version | String | "1.6.1" | The version of poetry to use | 
| plugins | [String ! ] | [] | Additional poetry plugins to install | 
Example
dagger -m github.com/francoissharpe/daggerverse/python@38c6e115ca67ecd1c051f80866d4d660227a794a call \
 with-poetryfunc (m *MyModule) Example() *dagger.Python  {
	return dag.
			Python().
			WithPoetry()
}@function
def example() -> dagger.Python:
	return (
		dag.python()
		.with_poetry()
	)@func()
example(): Python {
	return dag
		.python()
		.withPoetry()
}