Mixins
AuthMixin dataclass
AuthMixin(*, context_name: str)
Mixin that provides authentication helpers for qlam API clients.
Manages an AppContext scoped to a qlam context name and ensures the client is authenticated before making API calls.
Attributes:
| Name | Type | Description |
|---|---|---|
context_name | str | Name of the qlam context to use. |
app_context property
app_context: AppContext
The AppContext used to authenticate and connect to the backend.
Returns:
| Name | Type | Description |
|---|---|---|
AppContext | AppContext | An app context scoped to |
authenticate
authenticate()
Ensure the client is authenticated, triggering a login if needed.
Returns:
| Type | Description |
|---|---|
| The login result when a login is performed; otherwise None. |
Source code in src/bloqade/core/device/mixins.py
29 30 31 32 33 34 35 36 37 38 39 | |