quickie.factories.script
- quickie.factories.script(obj: Callable[[...], str]) Script
- quickie.factories.script(*, executable: str | None = None, env: dict[str, str] | None = None, wd: str | None = None, **kwargs: Unpack[CommonTaskKwargs]) PartialReturnType[Script]
Create a script from a function.
@script(name="hello", bind=True) def hello_script(task): return "echo Hello, script!" @script def hello_world(): """Docstring will be used as help text.""" return "echo Hello, world!"
- Parameters:
obj – The function to create the script from.
executable – The executable to use for the script.
env – The environment variables for the script.
wd – The working directory for the script.
kwargs – Common keyword arguments for tasks. See CommonTaskKwargs for more information.
- Returns:
The task class, or, if obj is None, a partial function to be used as a decorator for a function.