leaguemanager.cli¶
CLI for League Manager tool.
Module Contents¶
Functions¶
Run a scheduler for the given season. |
|
Load data from a file into the database. |
|
League Manager CLI. |
Data¶
API¶
- leaguemanager.cli.settings¶
‘get_settings(…)’
- leaguemanager.cli.app¶
‘Typer(…)’
- leaguemanager.cli._version_callback(value: bool) None¶
- leaguemanager.cli.populate(season_service: Annotated[Optional[leaguemanager.services.SeasonService], typer.Argument(callback=provide_manager_service, parser=SeasonService)] = None, league_service: Annotated[Optional[leaguemanager.services.LeagueService], typer.Argument(callback=provide_manager_service, parser=LeagueService)] = None, team_service: Annotated[Optional[leaguemanager.services.TeamService], typer.Argument(callback=provide_manager_service, parser=TeamService)] = None, team_membership_service: Annotated[Optional[leaguemanager.services.TeamMembershipService], typer.Argument(callback=provide_manager_service, parser=TeamMembershipService)] = None, organization_service: Annotated[Optional[leaguemanager.services.OrganizationService], typer.Argument(callback=provide_manager_service, parser=OrganizationService)] = None) None¶
- leaguemanager.cli.schedule(session: Annotated[Optional[sqlalchemy.orm.Session], typer.Argument(callback=provide_sync_db_session, parser=Session)] = None, season_service: Annotated[Optional[leaguemanager.services.SeasonService], typer.Argument(callback=provide_manager_service, parser=SeasonService)] = None, scheduler: Annotated[Optional[leaguemanager.services.RoundRobinSchedule], typer.Argument(callback=provide_scheduler_service, parser=RoundRobinSchedule)] = None, season_name: Annotated[Optional[str], typer.Argument(help='Name of the season to schedule.')] = None) None¶
Run a scheduler for the given season.
- leaguemanager.cli.check(session: Annotated[Optional[sqlalchemy.orm.Session], typer.Argument(callback=provide_sync_db_session, parser=Session)] = None, season_service: Annotated[Optional[leaguemanager.services.SeasonService], typer.Argument(callback=provide_manager_service, parser=SeasonService)] = None, league_service: Annotated[Optional[leaguemanager.services.LeagueService], typer.Argument(callback=provide_manager_service, parser=LeagueService)] = None, team_service: Annotated[Optional[leaguemanager.services.TeamService], typer.Argument(callback=provide_manager_service, parser=TeamService)] = None, organization_service: Annotated[Optional[leaguemanager.services.OrganizationService], typer.Argument(callback=provide_manager_service, parser=OrganizationService)] = None, all: bool = typer.Option(False, '--all', '-a', help='Check all seasons, leagues, and teams.')) None¶
- leaguemanager.cli._loader(session: Annotated[Optional[sqlalchemy.orm.Session], typer.Argument(callback=provide_sync_db_session, parser=Session)] = None, csv_loader: Annotated[Optional[leaguemanager.services.template_loader.league_importer.CSVLoader], typer.Argument(callback=provide_importer_service, parser=CSVLoader)] = None, excel_loader: Annotated[Optional[leaguemanager.services.template_loader.league_importer.ExcelLoader], typer.Argument(callback=provide_importer_service, parser=ExcelLoader)] = None, google_sheets_loader: Annotated[Optional[leaguemanager.services.template_loader.league_importer.GoogleSheetsLoader], typer.Argument(callback=provide_importer_service, parser=GoogleSheetsLoader)] = None, json_loader: Annotated[Optional[leaguemanager.services.template_loader.league_importer.JSONLoader], typer.Argument(callback=provide_importer_service, parser=JSONLoader)] = None, memory_loader: Annotated[Optional[leaguemanager.services.template_loader.league_importer.MemoryLoader], typer.Argument(callback=provide_importer_service, parser=MemoryLoader)] = None, file_path: Annotated[Optional[str], typer.Argument(help='Path to the file to load data from.')] = None, sheet_id: Annotated[Optional[str], typer.Argument(help='Google Sheets ID to load data from.')] = None, spreadsheet_name: Annotated[Optional[str], typer.Argument(help='Name of the Google Sheets spreadsheet to load data from.')] = None, source: str = typer.Option(default=..., help='Source of the data (excel, csv, google-sheet, json, memory).'), validate: bool = typer.Option(False, '--validate', '-v', help='Validate the data before loading it into the database.')) None¶
Load data from a file into the database.
- leaguemanager.cli._delete(session: Annotated[Optional[sqlalchemy.orm.Session], typer.Argument(callback=provide_sync_db_session, parser=Session)] = None, all: bool = typer.Option(False, '--all', '-a', help='Delete all seasons, leagues, teams, and organization.')) None¶
- leaguemanager.cli.main(ctx: typer.Context, version: Annotated[Optional[bool], typer.Option('--version', '-V', callback=_version_callback, is_eager=True, help='Show the version and exit.')] = None)¶
League Manager CLI.