Skip to content

Aadv1k/schoolOS-api-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SchoolOS-api-wrapper

An unofficial wrapper made for https://ryangroup.toppr.school, it might work with other sites based on schoolOS too

Installation

git clone https://github.com/aadv1k/schoolOS-api-wrapper.git
cd schoolOS-api-wrapper
pip install -r requirements.txt

Then, you can either import schoolOS or put your credentials in example.py and run it directly from there.

This app is tested with python 3.6 (and above)

Usage

Initialization

To use the functions provided below, you must initialize the app with your credentials, which can be done like so

import schoolos
s = schoolos.schoolOS('YOUR USERNAME', 'YOUR PASSWORD', 'SCHOOL GROUP')
# School group is your school's url -> {school-group}.toppr.school

get_timetable(start, end) Gets the weekly classes, takes a start and an end date, both of which need to be in the format of yyyy-mm-dd and the date needs to be of Sunday-Saturday else it won't work; Returns a python dictionary.

get_assignments(complete=bool, quantity=int) Gets the assignments, by default gives out incomplete assignments, with a view set to 5, in order to change it you can set the complete=True to get the completed assignment and quantity=10 to get more than five assignments, note that the input can only be a multiple of 5, anything else wont work.

About

A simple api wrapper based around https://www.toppr.school/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages