- Flexible cache system (Based on SQLAlchemy ORM)
- Easy to use authentication process
- Lazy object loading
- Use features from
Mobilne Dodatki
or their spare solutions __repr__
and__str__
are pretty human readable
# Windows
# Latest stable
pip install librus-tricks
# Libs for examples
pip install librus-tricks[examples]
# Dev channel
pip install git+https://github.com/Backdoorek/Librus-Tricks.git@prototype
# Linux
# Latest stable
sudo -H pip3 install librus-tricks
# Libs for examples
sudo -H pip3 install librus-tricks[examples]
# Dev channel
sudo -H pip3 install git+https://github.com/Backdoorek/Librus-Tricks.git@prototype
# Create session (with support for messages, require the same password for Portal Librus and Synergia)
from librus_tricks import create_session
session = create_session('[email protected]', 'admin1')
# If passwords are different
from librus_tricks import SynergiaClient, authorizer
session = SynergiaClient(authorizer('[email protected]', 'admin1')[0], synergia_user_passwd='admin2')
# Get selected grades
session.get_grades(selected=(27208160, 24040273, 21172894))
# (<SynergiaGrade 21172894>, <SynergiaGrade 24040273>, <SynergiaGrade 27208160>)
# Get future exams
session.get_exams()
# [<SynergiaExam 2019-03-27 00:00:00 for subject with id 37659>, <SynergiaExam 2019-03-28 00:00:00 for subject with id 37675>, <SynergiaExam 2019-03-26 00:00:00 for subject with id 37670>]
# Get timetable
session.get_timetable()
# {'2019-03-18': [<TimetableFrame 08:00->08:45 Historia with Krzysztof ...>, <TimetableFrame 08:55->09:40 Wychowanie fizyczne with Artur ...>, <TimetableFrame 09:50->10:35 Wychowanie fizyczne with Arkadiusz ...>, <TimetableFrame 10:50->11:35 Edukacja dla bezpieczeństwa with Arkadiusz ...>, <TimetableFrame 11:45->12:30 Godzina wychowawcza with Elżbieta ...>, <TimetableFrame 12:50->13:35 Język polski with Aleksandra ...>, <TimetableFrame 13:50->14:35 Język polski with Aleksandra ...>], '2019-03-19': [<TimetableFrame 08:00->08:45 Matematyka with Joanna ...>, <TimetableFrame 08:55->09:40 Matematyka with Joanna ...>, <TimetableFrame 09:50->10:35 Geografia with Agnieszka ...>, <TimetableFrame 10:50->11:35 Wiedza o społeczeństwie with Sylwia ...>, <TimetableFrame 11:45->12:30 Język niemiecki with Elżbieta ...>, <TimetableFrame 12:50->13:35 Matematyka with Joanna ...>], '2019-03-20': [<TimetableFrame 08:00->08:45 Chemia with Edyta ...>, <TimetableFrame 08:55->09:40 Religia with Magdalena ...>, <TimetableFrame 09:50->10:35 Język angielski with Krystyna ...>, <TimetableFrame 10:50->11:35 Etyka with Marta ...>, <TimetableFrame 11:45->12:30 Informatyka with Iwona ...>, <TimetableFrame 12:50->13:35 Język angielski with Krystyna ...>, <TimetableFrame 13:50->14:35 Język niemiecki with Elżbieta ...>], '2019-03-21': [<TimetableFrame 08:00->08:45 Język polski with Aleksandra ...>, <TimetableFrame 08:55->09:40 Język polski with Aleksandra ...>, <TimetableFrame 09:50->10:35 Fizyka with Hieronim ...>, <TimetableFrame 10:50->11:35 Wiedza o kulturze with Elżbieta ...>, <TimetableFrame 11:45->12:30 Religia with Magdalena ...>, <TimetableFrame 12:50->13:35 Język angielski with Krystyna ...>, <TimetableFrame 13:50->14:35 Język angielski with Krystyna ...>], '2019-03-22': [<TimetableFrame 08:00->08:45 Wychowanie fizyczne with Arkadiusz ...>, <TimetableFrame 08:55->09:40 Wychowanie fizyczne with Arkadiusz ...>, <TimetableFrame 09:50->10:35 Informatyka with Iwona ...>, <TimetableFrame 10:50->11:35 Matematyka with Joanna ...>, <TimetableFrame 11:45->12:30 Matematyka with Joanna ...>]}
# Get messages
session.message_reader.read_messages()
# [<Message from aaa Izabella (aaa Izabella) into /wiadomosci/1/5/5983071/f0>, ...]
For more examples check the examples folder
Written with ❤ from a scratch by Krystian
Backdoorek
PostekThanks for guys from librus-client for help with getting into it