API Documentation

allen.allenclient

class allen.allenclient.AllenClient(username: Optional[Union[str, int]] = None, password: Optional[str] = None, jwt: Optional[str] = None)

Bases: object

Base class for access to Allen’s API.

Note

You do not have the enter all three init parameters. Either authenticate using username and password, or using JWT.

get_addon_classes() List[allen.addon_classes.AddonClass]

Fetch the list of addon classes available.

Returns

A list of the class:addon_classes.AddonClass class

get_exam_calendar() List[allen.exam.Examination]

Fetch the list of exams on the exam calendar.

Returns

A list of the class:exam.Examination class

get_live_classes() List[allen.video.LiveClassDay]

Fetch the list of upcoming live classes.

Returns

A list of the class:video.LiveClassDay class

get_recorded_videos() List[allen.video.RecordedVideo]

Fetch the list of recorded videos available to view.

Returns

A list of the class:video.RecordedVideo class

get_test_records() List[allen.test_record.TestRecord]

Fetch the list of tests you’ve attempted.

Returns

A list of the class:test_record.TestRecord class

allen.exceptions

exception allen.exceptions.AllenInvalidResponse(response: requests.models.Response)

Bases: Exception

Exception representing a corrupted / unexpected response received from the server.

exception allen.exceptions.AllenInvalidUsernamePassword

Bases: Exception

Exception representing an invalid username or password entered.

exception allen.exceptions.AllenResponseUnavailable(url: str, response: requests.models.Response)

Bases: Exception

Exception representing a failed request to a resource.

allen.solution

class allen.solution.Solution(question_no: int, response: str, image: str)

Bases: object

image: str

The url of the image containing the solution

question_no: int

The number of the question

response: str

The answer marked while attempting the test

class allen.solution.SubjectSolution(subject_name: str, total_questions: int, solutions: List[allen.solution.Solution])

Bases: object

get_solutions()

Get the list of Solution for the subject.

Returns

A list of the class:Solution object

solutions: List[allen.solution.Solution]

The list of solutions for the subject

subject_name: str

The name of the subject

total_questions: int

The number of questions which were present for the subject

allen.test_record

class allen.test_record.TestRecord(biology: int, physics: int, chemistry: int, maths: int, total: int, percentage: float, rank: int, test_name: str, _test_date: str, _test_id: str)

Bases: object

biology: int

The marks received in biology

chemistry: int

The marks received in chemistry

get_subject_solutions() List[allen.solution.SubjectSolution]

Get the solutions of the test.

Returns

A list of SubjectSolution objects.

get_test_date() Optional[str]

Returns the date of the test in Thursday : 01 January 1970 format.

Returns

The date if a valid date is present, else None.

maths: int

The marks received in maths

percentage: float

The percentage of marks

physics: int

The marks received in physics

rank: int

Rank received in the test

test_name: str

The name of the test

Example:

JEE ENTHUSE INTERNAL TEST-01-PAPER 1
total: int

The total marks received

allen.video

class allen.video.LiveClass(class_start_time: str, class_end_time: str, unique_code: str, subject_name: str, remaining_time: int)

Bases: object

class_end_time: str

The time the class ends in 12:00PM format

class_start_time: str

The time the class starts in 12:00PM format

remaining_time: int

The time remaining for the class to start in seconds

subject_name: str

The name of the subject which will be taught in the live video

unique_code: str

The unique code for the live video

class allen.video.LiveClassDay(class_day: str, _date: str, live_classes: List[allen.video.LiveClass])

Bases: object

class_day: str

The day of the live class, for example Wednesday

get_live_class_date() Optional[str]

Returns the date of the live classes in Thursday : 01 January 1970 format.

Returns

The date if a valid date is present, else None.

live_classes: List[allen.video.LiveClass]

The list of live classes on this day

class allen.video.RecordedVideo(unique_code: str, subject_name: str, _date: str)

Bases: object

Retrieve the link of the recorded video.

Returns

The link of the video.

get_recording_date() Optional[str]

Returns the date of the recording in Thursday : 01 January 1970 format.

Returns

The date if a valid date is present, else None.

subject_name: str

The name of the subject taught in the recorded video

unique_code: str

The unique code for the recorded video