flexpass.BackendDefinition
- class flexpass.BackendDefinition(*, backend_cls: type[Backend], name: str, priority: int, readonly: bool, **options)
Bases:
objectDefinition of a backend, used particularly before the backend instanciation.
Methods
__init__(*, backend_cls, name, priority, ...)Return the instanciated backend.
Attributes
Class of the backend.
Name of the backend.
Priority of the backend.
Indicate whether the backend is read-only.
Options to pass to the backend.
The actual backend if it was successfully instanciated.
The exception raised in case of error during backend instanciation.
- exception: Exception
The exception raised in case of error during backend instanciation.
- get_instance() Backend
Return the instanciated backend. Raise an exception in case of error during backend instanciation.
- name: str
Name of the backend.
- options: dict[str, Any]
Options to pass to the backend.
- priority: int
Priority of the backend.
- readonly: bool
Indicate whether the backend is read-only.