Skip to content

PerovXP/pyrinium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pyrinium

Pyrinium

Pyrinium is a small Python client for reading Sirius University schedule data.

It exposes a compact public API and emulates the schedule website's Livewire requests under the hood.

Status

Pyrinium is currently in beta.

The public Python API is intentionally small and expected to stay stable. The package depends on an unofficial Livewire interface used by the upstream website, so website-side protocol changes may require package updates.

Installation

pip install pyrinium

Usage

from pyrinium import Pyrinium

client = Pyrinium()
client.get_initial_data()

schedule = client.get_schedule("К0609-24")

print(schedule["group"])
print(schedule["events"])

Change Week

from pyrinium import Pyrinium

client = Pyrinium()
client.get_initial_data()

client.get_schedule("К0609-24")
next_week = client.change_week(1)

previous_week = client.change_week(-1)

API

Pyrinium.get_initial_data()

Loads the initial page state, cookies, and Livewire token. Call this before schedule operations.

Pyrinium.get_schedule(group: str)

Fetches the schedule for a group.

Returns:

{
    "group": "К0609-24",
    "events": [...]
}

Pyrinium.change_week(step: int)

Moves the schedule window by week offset.

  • positive values move forward
  • negative values move backward
  • zero keeps the current week

Returns the same compact schedule format as get_schedule().

Development

python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

pytest
python -m build
twine check dist/*

License

MIT

About

Python implementation of Sirinium

Resources

License

Stars

Watchers

Forks

Contributors

Languages