Crud Package#

Submodules#

Crud Run File#

server.crud.crud_run.create(db: Session, run: RunBase) Run[source]#

This method will create an entry in the Run table based on the run.py file. Refer to the models package for more information about the run.py. :param db: :param run: :return: Run

server.crud.crud_run.delete(db: Session, id: int, run: RunBase) None[source]#

Deletes the specified Run entity from the database. :param db: :param id: :param run: :return: None

server.crud.crud_run.read(db: Session, id: int, eager: bool = False) Run | None[source]#

This gets information from the Run table and returns it. Eager loading will determine whether to only return the entry in the Run table or to return it with more information from the tables that it’s related to. :param db: :param id: :param eager: :return: Run | None

server.crud.crud_run.read_all(db: Session, eager: bool = False) [<class 'server.models.run.Run'>][source]#

Returns all Run entities from the datatable. Eager loading determines whether to return all entities or return all entities with information from related tables. :param db: :param eager: :return: a list of Run objects

server.crud.crud_run.read_all_W_filter(db: Session, eager: bool = False, **kwargs) [<class 'server.models.run.Run'>][source]#

Similar functionality to the read_all() method, but this filters based on the given information which is unpacked by using **. :param db: :param eager: :param kwargs: :return: a list of Run objects

server.crud.crud_run.update(db: Session, id: int, run: RunBase) Run | None[source]#

This method takes a Run object and updates the specified Run in the database with it. If there is nothing to update, returns None. :param db: :param id: :param run: :return: a Run object or None

Crud Submission File#

server.crud.crud_submission.create(submission: SubmissionWTeam, db: Session) Submission[source]#

This method will create an entry in the Submission table based on the submission.py file. Refer to the models package for more information about submission.py. :param db: :param id: :param eager: :return:

server.crud.crud_submission.delete(db: Session, id: int, submission: SubmissionWTeam) None[source]#

Deletes the specified Submission entity from the database. :param db: :param id: :param submission: :return: None

server.crud.crud_submission.get_latest_submission_for_each_team(db: Session) [<class 'server.models.submission.Submission'>][source]#
server.crud.crud_submission.read(db: Session, id: int, eager: bool = False) Submission | None[source]#

This gets information from the Run table and returns it. Eager loading will determine whether to only return the entry in the Run table or to return it with more information from the tables that it’s related to. :param db: :param id: :param eager: :return:

server.crud.crud_submission.read_all_W_filter(db: Session, eager: bool = False, **kwargs) [<class 'server.models.submission.Submission'>][source]#

Similar functionality to the read_all() method, but this filters based on the given information which is unpacked by using **. :param db: :param eager: :param kwargs: :return:

server.crud.crud_submission.read_all_by_team_id(db: ~sqlalchemy.orm.session.Session, team_uuid: <module 'uuid' from 'C:\\Users\\ianth\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\uuid.py'>, eager: bool = False) [<class 'server.models.submission.Submission'>][source]#

Similar functionality to the read_all() method, but this filters based on the given team uuid. :param db: :param team_uuid: :param eager: :return:

server.crud.crud_submission.update(db: Session, id: int, submission: SubmissionWTeam) Submission | None[source]#

This method takes a Run object and updates the specified Run in the database with it. If there is nothing to update, returns None. :param db: :param id: :param submission: :return:

Crud Submission Run Info File#

server.crud.crud_submission_run_info.create(db: Session, submission_run_info: SubmissionRunInfoBase) SubmissionRunInfo[source]#

This method will create an entry in the SubmissionRunInfo table based on the submission_run_info.py file. Refer to the models package for more information about submission_run_info.py. :param db: :param submission_run_info: :return: SubmissionRunInfo

server.crud.crud_submission_run_info.delete(db: Session, id: int, submission_run_info: SubmissionRunInfoBase) None[source]#

Deletes the specified SubmissionRunInfo entity from the database. :param db: :param id: :param submission_run_info: :return: None

server.crud.crud_submission_run_info.read(db: Session, id: int, eager: bool = False) SubmissionRunInfo | None[source]#

This gets information from the SubmissionRunInfo table and returns it. Eager loading will determine whether to only return the entry in the SubmissionRunInfo table or to return it with more information from the tables that it’s related to. :param db: :param id: :param eager: :return:

server.crud.crud_submission_run_info.read_all(db: Session, eager: bool = False) [<class 'server.models.submission_run_info.SubmissionRunInfo'>][source]#

Returns all SubmissionRunInfo entities from the datatable. Eager loading determines whether to return all entities or return all entities with information from related tables. :param db: :param eager: :return:

server.crud.crud_submission_run_info.read_all_W_filter(db: Session, eager: bool = False, **kwargs) [<class 'server.models.submission_run_info.SubmissionRunInfo'>][source]#

Similar functionality to the read_all() method, but this filters based on the given information which is unpacked by using **. :param db: :param eager: :param kwargs: :return:

server.crud.crud_submission_run_info.update(db: Session, id: int, submission_run_info: SubmissionRunInfoBase) SubmissionRunInfo | None[source]#

This method takes a SubmissionRunInfo object and updates the specified SubmissionRunInfo in the database with it. If there is nothing to update, returns None. :param db: :param id: :param submission_run_info: :return:

Crud Team File#

server.crud.crud_team.create(team: TeamBase, db: Session) Team[source]#

This method will create a table in the database called Team based on the run.py class. Refer to the models package for more information on them. :param team: :param db: :return:

server.crud.crud_team.delete(db: Session, id: int, team: TeamBase) None[source]#

Deletes the specified Team entity from the database. :param db: :param id: :param team: :return:

server.crud.crud_team.read(db: Session, id: str, eager: bool = False) Team | None[source]#

This method will create an entry in the Team table based on the team.py file. Refer to the models package for more information about team.py. :param db: :param id: :param eager: :return:

server.crud.crud_team.read_all(db: Session, eager: bool = False) [<class 'server.models.team.Team'>][source]#

Returns all Team entities from the datatable. Eager loading determines whether to return all entities or return all entities with information from related tables. :param db: :param eager: :return:

server.crud.crud_team.read_all_W_filter(db: Session, eager: bool = False, **kwargs) [<class 'server.models.team.Team'>][source]#

Similar functionality to the read_all() method, but this filters based on the given information which is unpacked by using **. :param db: :param eager: :param kwargs: :return:

server.crud.crud_team.update(db: Session, id: int, team: TeamBase) Team | None[source]#

This method takes a Team object and updates the specified Team in the database with it. If there is nothing to update, returns None. :param db: :param id: :param team: :return:

Crud Team Type File#

server.crud.crud_team_type.create(db: Session, team_type: TeamTypeBase) TeamType[source]#

This method will create an entry in the Team Type table based on the team_type.py file. Refer to the models package for more information about team_type.py. :param db: :param team_type: :return:

server.crud.crud_team_type.delete(db: Session, id: int, team_type: TeamTypeBase) None[source]#

Deletes the specified Team Type entity from the database. :param db: :param id: :param team_type: :return: None

server.crud.crud_team_type.read(db: Session, id: int, eager: bool = False) TeamType | None[source]#

This gets information from the Team Type table and returns it. Eager loading will determine whether to only return the entry in the Team Type table or to return it with more information from the tables that it’s related to. :param db: :param id: :param eager: :return:

server.crud.crud_team_type.read_all(db: Session, eager: bool = False) [<class 'server.models.team_type.TeamType'>][source]#

Returns all Team Type entities from the datatable. Eager loading determines whether to return all entities or return all entities with information from related tables. :param db: :param eager: :return:

server.crud.crud_team_type.read_all_W_filter(db: Session, eager: bool = False, **kwargs) [<class 'server.models.team_type.TeamType'>][source]#

Similar functionality to the read_all() method, but this filters based on the given information which is unpacked by using **. :param db: :param eager: :param kwargs: :return:

server.crud.crud_team_type.update(db: Session, id: int, team_type: TeamTypeBase) TeamType | None[source]#

This method takes a Team Type object and updates the specified Team Type in the database with it. If there is nothing to update, returns None. :param db: :param id: :param team_type: :return:

Crud Tournament File#

server.crud.crud_tournament.create(db: Session, tournament: TournamentBase) Tournament[source]#

This method will create a table in the database called Tournament based on the run.py class. Refer to the models package for more information on them. :param db: :param tournament: :return:

server.crud.crud_tournament.delete(db: Session, id: int) None[source]#

Deletes the specified Tournament entity from the database. :param db: :param id: :return: None

server.crud.crud_tournament.get_latest_tournament(db: Session, with_turns: bool = False) Tournament | None[source]#
server.crud.crud_tournament.read(db: Session, id: int, eager: bool = False) Tournament | None[source]#

This method will create an entry in the Tournament table based on the tournament.py file. Refer to the models package for more information about tournament.py. :param db: :param id: :param eager: :return:

server.crud.crud_tournament.read_all(db: Session, eager: bool = False) [<class 'server.models.tournament.Tournament'>][source]#

Returns all Tournament entities from the datatable. Eager loading determines whether to return all entities or return all entities with information from related tables. :param db: :param eager: :return:

server.crud.crud_tournament.read_all_W_filter(db: Session, eager: bool = False, **kwargs) [<class 'server.models.tournament.Tournament'>][source]#

Similar functionality to the read_all() method, but this filters based on the given information which is unpacked by using **. :param db: :param eager: :param kwargs: :return:

server.crud.crud_tournament.update(db: Session, id: int, tournament: TournamentBase) Tournament | None[source]#

This method takes a Tournament object and updates the specified Tournament in the database with it. If there is nothing to update, returns None. :param db: :param id: :param tournament: :return:

Crud Turn File#

server.crud.crud_turn.create(db: Session, turn: TurnBase) Turn[source]#

This method will create an entry in the Turn table based on the turn.py file. Refer to the models package for more information about turn.py. :param db: :param turn: :return:

server.crud.crud_turn.create_all(db: ~sqlalchemy.orm.session.Session, turns: [<class 'server.schemas.turn.turn_base.TurnBase'>]) None[source]#
server.crud.crud_turn.delete(db: Session, turn_number: int, run_id: int) None[source]#

Deletes the specified Turn entity from the database. :param db: :param turn_number: :param run_id: :return: None

server.crud.crud_turn.delete_all(db: Session) None[source]#

Deletes all turn records from the database. :param db: :return: None

server.crud.crud_turn.read(db: Session, turn_number: int, run_id: int, eager: bool = False) Turn | None[source]#

This gets information from the Turn table and returns it. Eager loading will determine whether to only return the entry in the Turn table or to return it with more information from the tables that it’s related to. :param db: :param turn_number: :param run_id: :param eager: :return:

server.crud.crud_turn.read_all(db: Session, eager: bool = False) [<class 'server.models.turn.Turn'>][source]#

Returns all Turn entities from the datatable. Eager loading determines whether to return all entities or return all entities with information from related tables. :param db: :param eager: :return:

server.crud.crud_turn.read_all_W_filter(db: Session, eager: bool = False, **kwargs) [<class 'server.models.turn.Turn'>][source]#

Similar functionality to the read_all() method, but this filters based on the given information which is unpacked by using **. :param db: :param eager: :param kwargs: :return:

server.crud.crud_turn.update(db: Session, turn_number: int, run_id: int, turn: TurnBase) Turn | None[source]#

This method takes a Turn object and updates the specified Turn in the database with it. If there is nothing to update, returns None. :param db: :param turn_number: :param run_id: :param turn: :return:

Crud University File#

server.crud.crud_university.create(db: Session, university: UniversityBase) University[source]#

This method will create an entry in the University table based on the university.py file. Refer to the models package for more information about university.py. :param db: :param university: :return:

server.crud.crud_university.delete(db: Session, id: int, university: UniversityBase) None[source]#

Deletes the specified University entity from the database. :param db: :param id: :param university: :return: None

server.crud.crud_university.read(db: Session, id: int, eager: bool = False) University | None[source]#

This gets information from the University table and returns it. Eager loading will determine whether to only return the entry in the University table or to return it with more information from the tables that it’s related to. :param db: :param id: :param eager: :return:

server.crud.crud_university.read_all(db: Session, eager: bool = False) [<class 'server.models.university.University'>][source]#

Returns all University entities from the datatable. Eager loading determines whether to return all entities or return all entities with information from related tables. :param db: :param eager: :return:

server.crud.crud_university.read_all_W_filter(db: Session, eager: bool = False, **kwargs) [<class 'server.models.university.University'>][source]#

Similar functionality to the read_all() method, but this filters based on the given information which is unpacked by using **. :param db: :param eager: :param kwargs: :return:

server.crud.crud_university.update(db: Session, id: int, university: UniversityBase) University | None[source]#

This method takes a University object and updates the specified University in the database with it. If there is nothing to update, returns None. :param db: :param id: :param university: :return:

Module contents#