basquads package

Squads functionality (in development for 1.9).

class basquads.SquadsAppMode[source]

Bases: AppMode

The app-mode for squads (in development for 1.9).

Currently a scaffold. It is not in the project’s default app-modes, so the app never selects it on its own; it can be switched to manually via the dev-console’s AppModes tab.

classmethod can_handle_intent(intent: AppIntent) → bool[source]

Override this to define indent handling for an app-mode.

handle_intent(intent: AppIntent) → None[source]

Handle an intent.

on_activate(config: AppModeConfig) → None[source]

Called when the mode is becoming the active one for the app.

config is the object created by new_app_mode_config() for this activation, possibly amended by plugins. Modes that define their own config type should begin with assert isinstance(config, TheirConfig) to recover the concrete type, then set themselves (and any app-subsystems they use) up from it.

on_deactivate() → None[source]

Called when the mode stops being the active one for the app.

On platforms where the app is explicitly exited (such as desktop PC) this will also be called at app shutdown.

To best cover both mobile and desktop style platforms, actions such as saving state should generally happen in response to both on_deactivate() and on_app_active_changed() (when active is False).

class basquads.SquadsAppSubsystem[source]

Bases: object

Subsystem for Squads functionality in the app.

If has_python_app_subsystem is enabled for our feature-set, the single shared instance of this class can be accessed as squads on the App instance.