pesuacademy package

Submodules

pesuacademy.pesuacademy

class pesuacademy.pesuacademy.PESUAcademy(username: str | None = None, password: str | None = None)

Bases: object

A class to interact with PESU Academy website. This class is the entrypoint to all the functionality in this module

announcements(start_date: str | None = None, end_date: str | None = None) list[Announcement]

Get the announcements from the PESU Academy website.

Parameters:

start_date – The start date of the announcements to fetch in “yyyy-mm-dd” format. If not provided, all

announcements from the beginning are fetched. :param end_date: The end date of the announcements to fetch in “yyyy-mm-dd” format. If not provided, all announcements till the end are fetched. :return: The list of announcements.

attendance(semester: int | None = None) dict[int, list[Course]]

Get the attendance in courses of the currently authenticated user.

Parameters:

semester – The semester number. If not provided, attendance across all semesters are returned.

Returns:

The attendance information for the given semester.

property authenticated
courses(semester: int | None = None) dict[int, list[Course]]

Get the courses of the currently authenticated user.

Parameters:

semester – The semester number. If not provided, all courses across all semesters are returned.

Returns:

The course information for the given semester.

generate_csrf_token(username: str | None = None, password: str | None = None) str

Generate a CSRF token. If username and password are provided, authenticate and get the CSRF token.

Parameters:
  • username – Your SRN, PRN or email address.

  • password – Your password.

Returns:

The CSRF token.

know_your_class_and_section(username: str) ClassAndSectionInfo

Get the publicly visible class and section information of a student from the Know Your Class and Section page.

Parameters:

username – The SRN, PRN or email address of the student.

Returns:

The profile information.

profile() Profile

Get the private profile information of the currently authenticated user.

Returns:

The profile information.

seating_information() list[SeatingInformation]

Get the seating information of the currently authenticated user.

Returns:

The seating information.