Python package for interacting & fetching somtoday's data.
Project description
Somtoday Python, the interactor
See CHANGELOG.md for changes/updates
See the examples/ folder to see how to use the api
A big revamp has been made, I am planning to add SSO authentication.
Expect bugs with authentication, please make an issue on this repo if you find any bugs
asynchronous support for somtodaypython has been deprecated
somtodaypython is a package that fetches and interacts with Somtoday API using HTTPS requests.
installation
for macos & linux
python3 -m pip3 install somtodaypython
for windows
python3 -m pip install somtodaypython
OR
python -m pip install somtodaypython
if neither above works then you can always install by github repository
pip3 install git+https://github.com/luxkatana/somtodayapi_python
examples
basic interacting with a student(getting data from the student)
import somtodaypython.nonasyncsomtoday as nonasync_somtoday
school = nonasync_somtoday.find_school("SchoolName")
student = school.get_student("NAME", "password")
print(f"email : {student.email}\tname: {student.full_name}\tgender: {student.gender}")
basic interacting with the timetable of a student
import somtodaypython.nonasyncsomtoday as nonasync_somtoday
from datetime import timedelta, datetime as dt
school = nonasync_somtoday.find_school("SchoolName")
student = school.get_student("NAME", "password")
today = dt.now()
tomorrow = today + timedelta(days=2)
timetable: list[list[nonasync_somtoday.Subject]] = student.fetch_schedule(today, tomorrow, group_by_day=True)
for day in timetable:
for day_subject in day:
print(day_subject.subject_name)
Contribution
New PR's are welcome.
Huizengek#6623 Special thanks to Huizengek#6623 for showing the method of getting the access token & interacting with the somtoday API.
github: https://github.com/25huizengek1
elisaado
Special thanks to elisaado for making important API endpoints visible to other users.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 somtodaypython-1.2.2.tar.gz.
File metadata
- Download URL: somtodaypython-1.2.2.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3f34e7189e3ee2950154267d78928700cb5356a2382d3e1a66a7c897b476b6c
|
|
| MD5 |
ab5e9777387531c2556a262de0548c3f
|
|
| BLAKE2b-256 |
a4ae2c2943f03c80de9043fc990df09954bc8d07ccb150b5f5ac651a7e569fc9
|
Provenance
The following attestation bundles were made for somtodaypython-1.2.2.tar.gz:
Publisher:
python-publish.yml on luxkatana/somtodayapi_python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
somtodaypython-1.2.2.tar.gz -
Subject digest:
b3f34e7189e3ee2950154267d78928700cb5356a2382d3e1a66a7c897b476b6c - Sigstore transparency entry: 434339511
- Sigstore integration time:
-
Permalink:
luxkatana/somtodayapi_python@67124cd6d6f99e11840b263d460e7cf8da6cdc80 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/luxkatana
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@67124cd6d6f99e11840b263d460e7cf8da6cdc80 -
Trigger Event:
push
-
Statement type:
File details
Details for the file somtodaypython-1.2.2-py3-none-any.whl.
File metadata
- Download URL: somtodaypython-1.2.2-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fd393b6db2f0beeae6439057102a591a49c6947f6d7fce1188e109c1f01e16b
|
|
| MD5 |
4e28d5c46d7acb195db03389ced8d239
|
|
| BLAKE2b-256 |
a7bbcd97980b4b0a95f72084b248e49a35681ffd1b6e7161179c59cad2350b12
|
Provenance
The following attestation bundles were made for somtodaypython-1.2.2-py3-none-any.whl:
Publisher:
python-publish.yml on luxkatana/somtodayapi_python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
somtodaypython-1.2.2-py3-none-any.whl -
Subject digest:
5fd393b6db2f0beeae6439057102a591a49c6947f6d7fce1188e109c1f01e16b - Sigstore transparency entry: 434339543
- Sigstore integration time:
-
Permalink:
luxkatana/somtodayapi_python@67124cd6d6f99e11840b263d460e7cf8da6cdc80 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/luxkatana
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@67124cd6d6f99e11840b263d460e7cf8da6cdc80 -
Trigger Event:
push
-
Statement type: