Backend
Kind: Class
Domain: Core runtime
Canonical import: from cadflow.backend import Backend
Signature
class Backend(*args, **kwargs)
Description
Base class for protocol classes.
Base class for protocol classes.
Protocol classes are defined as::
class Proto(Protocol): def meth(self) -> int: ...
Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing), for example::
class C: def meth(self) -> int: return 0
def func(x: Proto) -> int: return x.meth()
func(C()) # Passes static type check
See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as::
class GenProto(Protocol[T]): def meth(self) -> T: ...
Parameters
| Name | Type | Required | Default | Source description |
|---|---|---|---|---|
args | Any | no | - | Not explicitly described in the source docstring. |
kwargs | Any | no | - | Not explicitly described in the source docstring. |
Returns
Type: Any
The source docstring does not declare additional return semantics.
Errors
The source docstring does not declare a narrower exception contract. Invalid types, values, ownership, paths, or backend state may still raise the corresponding public error.
Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
call | method | (self, operation: 'str', *args: 'Any', **kwargs: 'Any') -> 'Any' | See the member signature. |
supports | method | (self, operation: 'str') -> 'bool' | See the member signature. |
Behavior and constraints
- The contract below is generated from the current public runtime signature. Check domain notes for ownership and workflow constraints.
Import check
from cadflow.backend import Backend