Package module¶
Reference to the cloud.package.py module.
package
¶
Module with the logic for packaging an app to Nextmv Cloud.
package
¶
package(
app_dir: str,
manifest: Manifest,
model: Model | None = None,
model_configuration: ModelConfiguration | None = None,
verbose: bool = False,
rich_print: bool = False,
no_cache: bool = False,
) -> tuple[str, str]
Package the app into a tarball.
| PARAMETER | DESCRIPTION |
|---|---|
|
The directory of the application to package.
TYPE:
|
|
The app manifest describing the application type, files, and dependencies.
TYPE:
|
|
The Python model to encode and include in the package.
TYPE:
|
|
The configuration for encoding the Python model.
TYPE:
|
|
Whether to print verbose logs.
TYPE:
|
|
Whether to use rich printing for verbose logs.
TYPE:
|
|
When working with Python, dependencies are cached to speed up subsequent pushes. Setting no_cache to True will skip using the cache and force a fresh build of all dependencies. This is useful when you want to ensure that you are pushing the most up-to-date versions of your dependencies, or if you are encountering issues with the cache and want to rule it out as a potential cause.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
tuple of (str, str)
|
A tuple containing the path to the resulting |
Source code in nextmv-py/nextmv/nextmv/cloud/package.py
run_build_command
¶
run_build_command(
app_dir: str,
manifest_build: ManifestBuild | None = None,
verbose: bool = False,
rich_print: bool = False,
) -> None
Run the build command specified in the manifest.
| PARAMETER | DESCRIPTION |
|---|---|
|
The directory of the application, used as the working directory when running the build command.
TYPE:
|
|
The build configuration from the manifest. If
TYPE:
|
|
Whether to print verbose logs.
TYPE:
|
|
Whether to use rich printing for verbose logs.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
Exception
|
If the build command exits with a non-zero return code. |
Source code in nextmv-py/nextmv/nextmv/cloud/package.py
run_pre_push_command
¶
run_pre_push_command(
app_dir: str,
pre_push_command: str | None = None,
verbose: bool = False,
rich_print: bool = False,
) -> None
Run the pre-push command specified in the manifest.
| PARAMETER | DESCRIPTION |
|---|---|
|
The directory of the application, used as the working directory when running the pre-push command.
TYPE:
|
|
The shell command to execute before pushing. If
TYPE:
|
|
Whether to print verbose logs.
TYPE:
|
|
Whether to use rich printing for verbose logs.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
Exception
|
If the pre-push command exits with a non-zero return code. |