schoolsoft-api-app
A wrapper for schoolsofts undocumented api they use in their app.
Usage:
Get the school name from the schoolsoft url. Schoolname is found like this:
"sms13.schoolsoft.se/ school /jsp/student/right_student_startpage.jsp"
>>> import schoolsoft_api
>>> name, password, school = 'name', 'password', 'school' # Place real values here.
>>> app_key = schoolsoft_api.get_app_key(name, password, school)
>>> org_id = app_key['orgs'][0]['orgId']
>>> token = schoolsoft_api.get_updated_token(school, app_key_json=app_key)['token']
>>> schoolsoft_api.get_lunch(token, school, org_id)
[{'saturday': '', 'week': 33, 'updById': 1917, 'creByType': -1, 'creDate': '2020-08-11 14:41:04.0', 'dishCategoryName': 'Lunch', 'creById': 6271, 'thursday': '', 'dates': ['2020-08-10', '2020-08-11', '2020-08-12', '2020-08-13', '2020-08-14', '2020-08-15', '2020-08-16'], 'orgId': 28, 'updDate': '2020-08-14 09:46:56.0', 'empty': False, 'updByType': -1, 'sunday': '', 'tuesday': '', 'dish': 3, 'wednesday': '', 'friday': 'Spagetti med köttfärsås.\r\n\r\nSpagetti med sojafärssås', 'id': -1, 'monday': ''}]
>>> schoolsoft_api.get_lessons(token, school, org_id)
[{'weeks': 7329532, 'excludingWeeks': 0, 'creById': 6272, 'source': 1, 'externalRef': '', 'subjectId': 2947, 'orgId': 28, 'updDate': '2020-08-15 14:06:48.0', 'updByType': -1, 'excludeClass': 0, 'startTime': '1970-01-01 08:20:00.0', 'id': 295125, 'includingWe.......
- Obtain a permanent app key. This only needs to be generated once.
- Generate a temporary token. This needs to get generated once every 3h~.
- Call the API with the token.
Note:
- Activate mobile login on the schoolsoft webpage!
- Use
get_updated_token()to prevent requesting too many new tokens
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
schoolsoft_api-1.0.3.tar.gz
(4.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file schoolsoft_api-1.0.3.tar.gz.
File metadata
- Download URL: schoolsoft_api-1.0.3.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a84210dcc431ac880d53b947d24863c4226b5293ffed19e80936d677c9471d7
|
|
| MD5 |
84a57056f9d5a6ab42c0027a2ef61678
|
|
| BLAKE2b-256 |
cfc702b256188f79ee2445efe5b2bf4802cb449a28bf139433773fa6971dac7f
|
File details
Details for the file schoolsoft_api-1.0.3-py3-none-any.whl.
File metadata
- Download URL: schoolsoft_api-1.0.3-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7571f1384057d35c88969257edd7d62a46841cedc1f06cf1b063b0b1539b8df
|
|
| MD5 |
fbb24e3e41a7f3fec10b5ee85fc95e9e
|
|
| BLAKE2b-256 |
a9eba32ce3cab51732d2ed51e8e59bcb4f1f62ef1722a8f4539eaf6117ee9e70
|