Module spin_sdk.wit.imports.variables
Expand source code
from typing import TypeVar, Generic, Union, Optional, Protocol, Tuple, List, Any, Self
from enum import Flag, Enum, auto
from dataclasses import dataclass
from abc import abstractmethod
import weakref
from ..types import Result, Ok, Err, Some
@dataclass
class Error_InvalidName:
value: str
@dataclass
class Error_Undefined:
value: str
@dataclass
class Error_Provider:
value: str
@dataclass
class Error_Other:
value: str
Error = Union[Error_InvalidName, Error_Undefined, Error_Provider, Error_Other]
"""
The set of errors which may be raised by functions in this interface.
"""
def get(name: str) -> str:
"""
Get an application variable value for the current component.
The name must match one defined in in the component manifest.
Raises: `spin_sdk.wit.types.Err(spin_sdk.wit.imports.variables.Error)`
"""
raise NotImplementedError
Global variables
var Error
-
The set of errors which may be raised by functions in this interface.
Functions
def get(name: str) ‑> str
-
Get an application variable value for the current component.
The name must match one defined in in the component manifest.
Expand source code
def get(name: str) -> str: """ Get an application variable value for the current component. The name must match one defined in in the component manifest. Raises: `spin_sdk.wit.types.Err(spin_sdk.wit.imports.variables.Error)` """ raise NotImplementedError
Classes
class Error_InvalidName (value: str)
-
Error_InvalidName(value: str)
Expand source code
@dataclass class Error_InvalidName: value: str
Class variables
var value : str
class Error_Other (value: str)
-
Error_Other(value: str)
Expand source code
@dataclass class Error_Other: value: str
Class variables
var value : str
class Error_Provider (value: str)
-
Error_Provider(value: str)
Expand source code
@dataclass class Error_Provider: value: str
Class variables
var value : str
class Error_Undefined (value: str)
-
Error_Undefined(value: str)
Expand source code
@dataclass class Error_Undefined: value: str
Class variables
var value : str