gamesheet_sdk.teams.cli.commands.schedule package¶
Schedule CLI commands for GameSheet teams.
- gamesheet_sdk.teams.cli.commands.schedule.build_authenticated_session(config)[source]¶
Build a TeamsAuthenticatedSession from saved tokens.
- Parameters:
config (Config) – The application config.
- Returns:
TeamsAuthenticatedSession – A TeamsAuthenticatedSession ready to use.
- Raises:
Exit – If no tokens are saved.
- Return type:
- gamesheet_sdk.teams.cli.commands.schedule.run_action_or_exit(session, action, *args, **kwargs)[source]¶
Run an action function with error handling.
Wraps the action call in the session’s context manager and catches
AuthenticationErrorandGameSheetError. On either exception, prints a user-friendly error message to stderr and exits with code 1. The session context manager ensures proper cleanup (e.g., closing connections) regardless of success or failure.- Parameters:
session (BaseAuthenticatedSession) – The authenticated session to use as a context manager.
action (Callable[..., _R]) – A callable that takes
sessionand*argsand returns a result. Typically a domain action function (e.g.,list_associations).*args (object) – Positional arguments forwarded to
actionaftersession.**kwargs (object) – Keyword arguments forwarded to
action.
- Returns:
_R – The result of
action(session, *args, **kwargs)on success.- Raises:
Exit – If
actionraisesAuthenticationErrororGameSheetError. Exit code is 1 in both cases.- Return type:
_R
Submodules¶
- gamesheet_sdk.teams.cli.commands.schedule.events module
- gamesheet_sdk.teams.cli.commands.schedule.game_runner module
- gamesheet_sdk.teams.cli.commands.schedule.games module
- gamesheet_sdk.teams.cli.commands.schedule.helpers module
format_teams_window()resolve_schedule_create_times()resolve_occurrence_update_times()resolve_game_update_times()validate_update_scope()confirm_delete_or_abort()prompt_delete_scope()prompt_update_scope()handle_game_update()handle_occurrence_update()handle_occurrence_delete()occurrence_update_options()run_occurrence_update()
- gamesheet_sdk.teams.cli.commands.schedule.main module
- gamesheet_sdk.teams.cli.commands.schedule.practices module