Skip to content

Core - Manifest Module

anvil.api.core.manifest

The resource and behavior pack manifests, their pack settings, and the world template manifest and pack lists.

ManifestBP

Bases: _PackManifest

The behavior pack's manifest.json. It depends on the resource pack, and on the script modules when the project uses the Script API.

Documentation reference

identifier property

The file's identifier.

name property

The identifier's name, without its namespace.

settings property

Adds pack settings to the manifest.

__export__()

Exports the addon object after potentially shortening its content and replacing backslashes. Logs the event and writes the object to a file.

__init__()

Initializes a ManifestBP instance.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this file: the schema of its _document_type, with the file's type as title and where it is written under x-anvil-file.

Raises:

Type Description
TypeError

When the class is an abstract file base, with no document type.

queue()

Queues the manifest for export.

ManifestRP

Bases: _PackManifest

The resource pack's manifest.json. It depends on the behavior pack.

Documentation reference

identifier property

The file's identifier.

name property

The identifier's name, without its namespace.

settings property

Adds pack settings to the manifest.

__export__()

Exports the addon object after potentially shortening its content and replacing backslashes. Logs the event and writes the object to a file.

__init__()

Initializes a ManifestRP instance.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this file: the schema of its _document_type, with the file's type as title and where it is written under x-anvil-file.

Raises:

Type Description
TypeError

When the class is an abstract file base, with no document type.

queue()

Queues the manifest for export.

world_packs(version, pack_ids)

The packs a world applies, for world_resource_packs.json or world_behavior_packs.json.

Parameters:

Name Type Description Default
version tuple[int, int, int]

The version of every pack.

required
pack_ids Sequence[str]

The UUIDs of the packs.

required

world_template_manifest(version, module_uuid)

The world template's manifest.json, from the project config.

Parameters:

Name Type Description Default
version tuple[int, int, int]

The world template's version.

required
module_uuid str

The UUID of its world_template module.

required