manifest.py
create_manifest(package)
Creates an in-memory manifest for the given package or module.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
package
|
ModuleType
|
The package or module to create the manifest for. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ProjectModel |
ProjectModel
|
the manifest of the package or module. |
create_manifest_json(package, output=None, indent=2, **json_options)
create_manifest_json(
package: ModuleType,
output: None = None,
indent: int = 2,
**json_options: Any,
) -> str
create_manifest_json(
package: ModuleType,
output: Path,
indent: int = 2,
**json_options: Any,
) -> None
Creates a JSON manifest for the given package or module.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
package
|
ModuleType
|
The package or module to create a manifest for. |
required |
indent
|
int
|
The number of spaces to use for indentation in the JSON output. |
2
|
output
|
Path | None
|
path to the JSON file. Will be created if it does not exist. |
None
|
**json_options
|
Any
|
Additional options to pass to the |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str | None
|
The JSON manifest of the package or module. |