Skip to main content

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.

github: https://github.com/elisaado/somtoday-api-docs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

somtodaypython-1.2.2.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

somtodaypython-1.2.2-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

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

Hashes for somtodaypython-1.2.2.tar.gz
Algorithm Hash digest
SHA256 b3f34e7189e3ee2950154267d78928700cb5356a2382d3e1a66a7c897b476b6c
MD5 ab5e9777387531c2556a262de0548c3f
BLAKE2b-256 a4ae2c2943f03c80de9043fc990df09954bc8d07ccb150b5f5ac651a7e569fc9

See more details on using hashes here.

Provenance

The following attestation bundles were made for somtodaypython-1.2.2.tar.gz:

Publisher: python-publish.yml on luxkatana/somtodayapi_python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for somtodaypython-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5fd393b6db2f0beeae6439057102a591a49c6947f6d7fce1188e109c1f01e16b
MD5 4e28d5c46d7acb195db03389ced8d239
BLAKE2b-256 a7bbcd97980b4b0a95f72084b248e49a35681ffd1b6e7161179c59cad2350b12

See more details on using hashes here.

Provenance

The following attestation bundles were made for somtodaypython-1.2.2-py3-none-any.whl:

Publisher: python-publish.yml on luxkatana/somtodayapi_python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page