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
Metadata
Release files for schoolsoft-api 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| schoolsoft_api-1.0.3.tar.gz | 4.2 kB | Without provenance | Details for schoolsoft_api-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| schoolsoft_api-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for schoolsoft_api-1.0.3-py3-none-any.whl |
Total release size: 8.8 kB
Release files / schoolsoft_api-1.0.3.tar.gz
| Download URL | schoolsoft_api-1.0.3.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a84210dcc431ac880d53b947d24863c4226b5293ffed19e80936d677c9471d7
|
|
BLAKE2b-256 checksum How to use checksums |
cfc702b256188f79ee2445efe5b2bf4802cb449a28bf139433773fa6971dac7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / schoolsoft_api-1.0.3-py3-none-any.whl
| Download URL | schoolsoft_api-1.0.3-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e7571f1384057d35c88969257edd7d62a46841cedc1f06cf1b063b0b1539b8df
|
|
BLAKE2b-256 checksum How to use checksums |
a9eba32ce3cab51732d2ed51e8e59bcb4f1f62ef1722a8f4539eaf6117ee9e70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for schoolsoft-api 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.