Bamboost
bamboost/_typing

bamboost._typing

Attributes

  • StrPath:typing_extensions.TypeAlias=typing.Union[str, pathlib.Path]
  • _T=TypeVar('_T')
  • _U=TypeVar('_U')
  • _P=ParamSpec('_P')
  • _KT=TypeVar('_KT')
  • _VT=TypeVar('_VT')
  • SimulationParameterT:typing_extensions.TypeAlias=typing.MutableMapping[str, typing.Any]
  • Mutable=type('Mutable', (_Mutability,), {})
  • Immutable=type('Immutable', (_Mutability,), {})
  • _MT=TypeVar('_MT', bound=_Mutability)

Classes

SimulationMetadataT

Attributes:
  • created_at:datetime.datetime
  • modified_at:datetime.datetime
  • description:str
  • status:str

_MutabilitySentinel

A metaclass for creating mutability sentinel types.

This metaclass is used to create special types that represent mutability states (Mutable and Immutable). It provides custom boolean evaluation and string representation for the created types.

Get the string representation of the class.

Returns
The name of the class.

Determine the boolean value of the class.

Returns
True if the class is Mutable, False otherwise.
_MutabilitySentinel.__new__(cls, name, bases, attrs)

Create a new class using this metaclass.

Arguments:
  • cls
  • name:str

    The name of the class being created.

  • bases:tuple

    The base classes of the class being created.

  • attrs:dict

    The attributes of the class being created.

Returns
The newly created class.

ArrayLike

Protocol for objects that can be treated as array-like structures.

Attributes:
  • shape:tuple[int, ...]
  • dtype:typing.Any
ArrayLike.__len__(self) -> int
ArrayLike.__array__(self) -> Any