polywrap_manifest.wrap_0_1 module

This module contains functions and types for Wrap Manifest 0.1 .

class polywrap_manifest.wrap_0_1.Abi(*, version: str | None = None, objectTypes: List[ObjectDefinition] | None = None, moduleType: ModuleDefinition | None = None, enumTypes: List[EnumDefinition] | None = None, interfaceTypes: List[InterfaceDefinition] | None = None, importedObjectTypes: List[ImportedObjectDefinition] | None = None, importedModuleTypes: List[ImportedModuleDefinition] | None = None, importedEnumTypes: List[ImportedEnumDefinition] | None = None, importedEnvTypes: List[ImportedEnvDefinition] | None = None, envType: EnvDefinition | None = None)[source]

Bases: BaseModel

WRAP ABI that describes the interface of the WRAP module.

enum_types: List[EnumDefinition] | None
env_type: EnvDefinition | None
imported_enum_types: List[ImportedEnumDefinition] | None
imported_env_types: List[ImportedEnvDefinition] | None
imported_module_types: List[ImportedModuleDefinition] | None
imported_object_types: List[ImportedObjectDefinition] | None
interface_types: List[InterfaceDefinition] | None
module_type: ModuleDefinition | None
object_types: List[ObjectDefinition] | None
version: str | None
class polywrap_manifest.wrap_0_1.AnyDefinition(*, kind: float, type: str | Enum | None = None, name: str | None = None, required: bool | None = None, array: ArrayDefinition | None = None, scalar: ScalarDefinition | None = None, map: MapDefinition | None = None, object: ObjectRef | None = None, enum: EnumRef | None = None, unresolvedObjectOrEnum: UnresolvedObjectOrEnumRef | None = None)[source]

Bases: GenericDefinition

Any definition that describes the structure of any definition.

array: ArrayDefinition | None
enum: EnumRef | None
map: MapDefinition | None
object: ObjectRef | None
scalar: ScalarDefinition | None
unresolved_object_or_enum: UnresolvedObjectOrEnumRef | None
class polywrap_manifest.wrap_0_1.ArrayDefinition(*, kind: float, type: str | Enum | None = None, name: str | None = None, required: bool | None = None, array: ArrayDefinition | None = None, scalar: ScalarDefinition | None = None, map: MapDefinition | None = None, object: ObjectRef | None = None, enum: EnumRef | None = None, unresolvedObjectOrEnum: UnresolvedObjectOrEnumRef | None = None, item: GenericDefinition | None = None)[source]

Bases: AnyDefinition

Array definition that describes the structure of the array.

item: GenericDefinition | None
class polywrap_manifest.wrap_0_1.CapabilityDefinition(*, getImplementations: GetImplementations | None = None)[source]

Bases: BaseModel

Capability definition that contains the list of capabilities.

get_implementations: GetImplementations | None
class polywrap_manifest.wrap_0_1.EnumDefinition(*, comment: str | None = None, kind: float, type: str | Enum | None = None, name: str | None = None, required: bool | None = None, constants: List[str] | None = None)[source]

Bases: GenericDefinition, WithComment

Enum definition that describes the structure of the enum.

constants: List[str] | None
class polywrap_manifest.wrap_0_1.EnumRef(*, kind: float, type: str | Enum | None = None, name: str | None = None, required: bool | None = None)[source]

Bases: GenericDefinition

Enum reference that points to an enum definition.

class polywrap_manifest.wrap_0_1.Env(*, required: bool | None = None)[source]

Bases: BaseModel

Allows marking the env as required for the method.

required: bool | None
class polywrap_manifest.wrap_0_1.EnvDefinition(*, comment: str | None = None, kind: float, type: str | Enum | None = None, name: str | None = None, required: bool | None = None, properties: List[PropertyDefinition] | None = None, interfaces: List[InterfaceImplementedDefinition] | None = None)[source]

Bases: ObjectDefinition

Env definition that describes the structure of the env.

class polywrap_manifest.wrap_0_1.GenericDefinition(*, kind: float, type: str | Enum | None = None, name: str | None = None, required: bool | None = None)[source]

Bases: WithKind

Generic definition that describes the structure of the definition.

name: str | None
required: bool | None
type: str | Enum | None
class polywrap_manifest.wrap_0_1.GetImplementations(*, enabled: bool)[source]

Bases: BaseModel

Allows enabling/disabling the getImplementations capability.

enabled: bool
class polywrap_manifest.wrap_0_1.ImportedDefinition(*, uri: str, namespace: str, nativeType: str)[source]

Bases: BaseModel

Imported definition that contains the information about the imported definitions.

namespace: str
native_type: str
uri: str
class polywrap_manifest.wrap_0_1.ImportedEnumDefinition(*, uri: str, namespace: str, nativeType: str, comment: str | None = None, kind: float, type: str | Enum | None = None, name: str | None = None, required: bool | None = None, constants: List[str] | None = None)[source]

Bases: EnumDefinition, ImportedDefinition

Imported enum definition that describes the structure of the imported enum.

class polywrap_manifest.wrap_0_1.ImportedEnvDefinition(*, comment: str | None = None, uri: str, namespace: str, nativeType: str, kind: float, type: str | Enum | None = None, name: str | None = None, required: bool | None = None, properties: List[PropertyDefinition] | None = None, interfaces: List[InterfaceImplementedDefinition] | None = None)[source]

Bases: ImportedObjectDefinition

Imported env definition that describes the structure of the imported env.

class polywrap_manifest.wrap_0_1.ImportedModuleDefinition(*, comment: str | None = None, uri: str, namespace: str, nativeType: str, kind: float, type: str | Enum | None = None, name: str | None = None, required: bool | None = None, methods: List[MethodDefinition] | None = None, isInterface: bool | None = None)[source]

Bases: GenericDefinition, ImportedDefinition, WithComment

Imported module definition that describes the structure of the imported module.

is_interface: bool | None
methods: List[MethodDefinition] | None
class polywrap_manifest.wrap_0_1.ImportedModuleRef(*, type: str | None = None)[source]

Bases: BaseModel

Imported module points that refers to an imported module.

type: str | None
class polywrap_manifest.wrap_0_1.ImportedObjectDefinition(*, comment: str | None = None, uri: str, namespace: str, nativeType: str, kind: float, type: str | Enum | None = None, name: str | None = None, required: bool | None = None, properties: List[PropertyDefinition] | None = None, interfaces: List[InterfaceImplementedDefinition] | None = None)[source]

Bases: ObjectDefinition, ImportedDefinition, WithComment

Imported object definition that describes the structure of the imported object.

class polywrap_manifest.wrap_0_1.InterfaceDefinition(*, uri: str, namespace: str, nativeType: str, kind: float, type: str | Enum | None = None, name: str | None = None, required: bool | None = None, capabilities: CapabilityDefinition | None = None)[source]

Bases: GenericDefinition, ImportedDefinition

Interface definition that describes the structure of the interface.

capabilities: CapabilityDefinition | None
class polywrap_manifest.wrap_0_1.InterfaceImplementedDefinition(*, kind: float, type: str | Enum | None = None, name: str | None = None, required: bool | None = None)[source]

Bases: GenericDefinition

Interface Implemented definition that describes the interface implemented by the module.

class polywrap_manifest.wrap_0_1.MapDefinition(*, comment: str | None = None, kind: float, type: str | Enum | None = None, name: str | None = None, required: bool | None = None, array: ArrayDefinition | None = None, scalar: ScalarDefinition | None = None, map: MapDefinition | None = None, object: ObjectRef | None = None, enum: EnumRef | None = None, unresolvedObjectOrEnum: UnresolvedObjectOrEnumRef | None = None, key: MapKeyDefinition | None = None, value: GenericDefinition | None = None)[source]

Bases: AnyDefinition, WithComment

Map definition that describes the structure of the map.

key: MapKeyDefinition | None
value: GenericDefinition | None
class polywrap_manifest.wrap_0_1.MapKeyDefinition(*, kind: float, type: MapKeyType | None = None, name: str | None = None, required: bool | None = None, array: ArrayDefinition | None = None, scalar: ScalarDefinition | None = None, map: MapDefinition | None = None, object: ObjectRef | None = None, enum: EnumRef | None = None, unresolvedObjectOrEnum: UnresolvedObjectOrEnumRef | None = None)[source]

Bases: AnyDefinition

Map key definition that describes the structure of the map key.

type: MapKeyType | None
class polywrap_manifest.wrap_0_1.MapKeyType(value)[source]

Bases: Enum

Map key type that describes the type of the map key.

INT = 'Int'
INT16 = 'Int16'
INT32 = 'Int32'
INT8 = 'Int8'
STRING = 'String'
U_INT = 'UInt'
U_INT16 = 'UInt16'
U_INT32 = 'UInt32'
U_INT8 = 'UInt8'
class polywrap_manifest.wrap_0_1.MethodDefinition(*, comment: str | None = None, kind: float, type: str | Enum | None = None, name: str | None = None, required: bool | None = None, arguments: List[PropertyDefinition] | None = None, env: Env | None = None, **extra_data: Any)[source]

Bases: GenericDefinition, WithComment

Method definition that describes the signature of the method.

arguments: List[PropertyDefinition] | None
env: Env | None
return_: PropertyDefinition | None
class polywrap_manifest.wrap_0_1.ModuleDefinition(*, comment: str | None = None, kind: float, type: str | Enum | None = None, name: str | None = None, required: bool | None = None, methods: List[MethodDefinition] | None = None, imports: List[ImportedModuleRef] | None = None, interfaces: List[InterfaceImplementedDefinition] | None = None)[source]

Bases: GenericDefinition, WithComment

Module definition that describes the structure of the module.

imports: List[ImportedModuleRef] | None
interfaces: List[InterfaceImplementedDefinition] | None
methods: List[MethodDefinition] | None
class polywrap_manifest.wrap_0_1.ObjectDefinition(*, comment: str | None = None, kind: float, type: str | Enum | None = None, name: str | None = None, required: bool | None = None, properties: List[PropertyDefinition] | None = None, interfaces: List[InterfaceImplementedDefinition] | None = None)[source]

Bases: GenericDefinition, WithComment

Object definition that describes the structure of the object.

interfaces: List[InterfaceImplementedDefinition] | None
properties: List[PropertyDefinition] | None
class polywrap_manifest.wrap_0_1.ObjectRef(*, kind: float, type: str | Enum | None = None, name: str | None = None, required: bool | None = None)[source]

Bases: GenericDefinition

Object reference that points to an object definition.

class polywrap_manifest.wrap_0_1.PropertyDefinition(*, kind: float, type: str | Enum | None = None, name: str | None = None, required: bool | None = None, array: ArrayDefinition | None = None, scalar: ScalarDefinition | None = None, map: MapDefinition | None = None, object: ObjectRef | None = None, enum: EnumRef | None = None, unresolvedObjectOrEnum: UnresolvedObjectOrEnumRef | None = None, comment: str | None = None)[source]

Bases: WithComment, AnyDefinition

Property definition that describes the structure of the property.

class polywrap_manifest.wrap_0_1.ScalarDefinition(*, kind: float, type: ScalarType, name: str | None = None, required: bool | None = None)[source]

Bases: GenericDefinition

Scalar definition that describes the structure of the scalar type.

type: ScalarType
class polywrap_manifest.wrap_0_1.ScalarType(value)[source]

Bases: Enum

Scalar type that describes the type of the scalar.

BIG_INT = 'BigInt'
BIG_NUMBER = 'BigNumber'
BOOLEAN = 'Boolean'
BYTES = 'Bytes'
INT = 'Int'
INT16 = 'Int16'
INT32 = 'Int32'
INT8 = 'Int8'
JSON = 'JSON'
STRING = 'String'
U_INT = 'UInt'
U_INT16 = 'UInt16'
U_INT32 = 'UInt32'
U_INT8 = 'UInt8'
class polywrap_manifest.wrap_0_1.Type(value)[source]

Bases: Enum

Wrapper Package Type.

INTERFACE = 'interface'
PLUGIN = 'plugin'
WASM = 'wasm'
class polywrap_manifest.wrap_0_1.UnresolvedObjectOrEnumRef(*, kind: float, type: str | Enum | None = None, name: str | None = None, required: bool | None = None)[source]

Bases: GenericDefinition

Unresolved object or enum reference that doesn’t point to any object or enum definition.

class polywrap_manifest.wrap_0_1.Version(value)[source]

Bases: Enum

WRAP Standard Version.

VERSION_0_1 = '0.1'
VERSION_0_1_0 = '0.1.0'
class polywrap_manifest.wrap_0_1.WithComment(*, comment: str | None = None)[source]

Bases: BaseModel

With comment definition that describes the comment of the definition.

comment: str | None
class polywrap_manifest.wrap_0_1.WithKind(*, kind: float)[source]

Bases: BaseModel

With kind definition that describes the kind of the definition.

kind: float
class polywrap_manifest.wrap_0_1.WrapManifest(*, version: Version, type: Type, name: ConstrainedStrValue, abi: Abi)[source]

Bases: BaseModel

Wrap Manifest that contains metadata for the WRAP package.

class Config[source]

Bases: object

Pydantic model config.

extra = 'forbid'
abi: Abi
name: str
type: Type
version: Version