Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

A python wrapper of Synergia Librus API

Project description

Librus Tricks

TestsCodacy grade

GitHub code size in bytesGitHub commit activity

PyPI - DownloadsPyPI - VersionPyPI - Python Version

A powerful python Librus Synergia API based on RE Wiki was written in polish, checkout it here

What is inside the box?

  • Caching system (based on SQLite)
  • Lazy object loading
  • Simplified objects
  • Errors handlers
  • All-In-One login mechanism
  • Many buitt-in solutions (get future exams, get timetable etc.)
  • Docstrings (help for PyCharm, VS Codem, IDLE etc.)

Install

# Windows
# Latest stable
pip install librus-tricks
# Latest sources
pip install git+https://github.com/Backdoorek/Librus-Tricks.git@prototype

# Linux
# Latest stable
sudo -H pip3 install librus-tricks
# Latest sources
sudo -H pip3 install git+https://github.com/Backdoorek/Librus-Tricks.git@prototype

Examples

# Authentication
from librus_tricks import auth
user = auth.aio('my.mail@mydoamin.com', 'uniqepass')

# Create session
from librus_tricks import SynergiaClient
session = SynergiaClient(user)

# Get selected grades
session.get_grades(selected=('27208160', '24040273', '21172894'))
# (<SynergiaGrade 21172894>, <SynergiaGrade 24040273>, <SynergiaGrade 27208160>)

# Get future exams
session.get_future_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 ...>]}

For more examples check the examples folder

Screenshots from debugger

Grade

Wrapper in real use

Example with grades Example with timetable Example with attendance

Colors in your terminal might be different

Written with ❤ from a scratch by Krystian Backdoorek Postek

Thanks for guys from librus-client for help with getting into it

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
librus_tricks-0.3.0-py3-none-any.whl (17.3 kB) Copy SHA256 hash SHA256 Wheel py3
librus_tricks-0.3.0.tar.gz (16.0 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page