make_script()
Create a Python script (.py) in the scripts folder.
Usage
make_script(
name: str,
dir: str | Path | None = None,
stub: str = 'default',
*,
overwrite: bool = False,
) -> Path
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| name required | str |
The file name before slugifying, such as "Load Data", which becomes |
|
| dir | str | Path | None | None |
The folder. Default: |
| stub | str | 'default' |
The stub to start from, such as "default". The project's |
| overwrite | bool | False |
Replace an existing file. |
Value
The path of the new file.
Raises
FrameworkError: When the file exists andoverwriteis False, or the stub is not found.