numpy-wrapper
This module has been generated via dagger init and serves as a reference tobasic 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/Abraxas1010/numpy-wrapper-module@01b5890360e2de4c5a88b908ed055a8d0cf393a1
Entrypoint
Return Type
NumpyWrapper !
Example
dagger -m github.com/Abraxas1010/numpy-wrapper-module@01b5890360e2de4c5a88b908ed055a8d0cf393a1 call \
func (m *MyModule) Example() *dagger.NumpyWrapper {
return dag.
NumpyWrapper()
}
@function
def example() -> dagger.NumpyWrapper:
return (
dag.numpy_wrapper()
)
@func()
example(): NumpyWrapper {
return dag
.numpyWrapper()
}
Types
NumpyWrapper 🔗
containerEcho() 🔗
Returns a container that echoes whatever string argument is provided
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
stringArg | String ! | - | No description provided |
Example
dagger -m github.com/Abraxas1010/numpy-wrapper-module@01b5890360e2de4c5a88b908ed055a8d0cf393a1 call \
container-echo --string-arg string
func (m *MyModule) Example(stringArg string) *dagger.Container {
return dag.
NumpyWrapper().
ContainerEcho(stringArg)
}
@function
def example(string_arg: str) -> dagger.Container:
return (
dag.numpy_wrapper()
.container_echo(string_arg)
)
@func()
example(stringArg: string): Container {
return dag
.numpyWrapper()
.containerEcho(stringArg)
}
createRandomArray() 🔗
Creates a random square NumPy array of a given size and returns it as a string.
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
size | Integer ! | 5 | No description provided |
Example
dagger -m github.com/Abraxas1010/numpy-wrapper-module@01b5890360e2de4c5a88b908ed055a8d0cf393a1 call \
create-random-array --size integer
func (m *MyModule) Example(ctx context.Context, size int) string {
return dag.
NumpyWrapper().
CreateRandomArray(ctx, size)
}
@function
async def example(size: int) -> str:
return await (
dag.numpy_wrapper()
.create_random_array(size)
)
@func()
async example(size: number): Promise<string> {
return dag
.numpyWrapper()
.createRandomArray(size)
}
grepDir() 🔗
Returns lines that match a pattern in the files of the provided Directory
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
directoryArg | Directory ! | - | A directory. |
pattern | String ! | - | No description provided |
Example
dagger -m github.com/Abraxas1010/numpy-wrapper-module@01b5890360e2de4c5a88b908ed055a8d0cf393a1 call \
grep-dir --directory-arg DIR_PATH --pattern string
func (m *MyModule) Example(ctx context.Context, directoryArg *dagger.Directory, pattern string) string {
return dag.
NumpyWrapper().
GrepDir(ctx, directoryArg, pattern)
}
@function
async def example(directory_arg: dagger.Directory, pattern: str) -> str:
return await (
dag.numpy_wrapper()
.grep_dir(directory_arg, pattern)
)
@func()
async example(directoryArg: Directory, pattern: string): Promise<string> {
return dag
.numpyWrapper()
.grepDir(directoryArg, pattern)
}