Skip to main content

librusapi - A Librus Synergia scraper

Goal of this project is to free students from the limitations of Librus Synergia software mainly: giving the user fresh information unlike their mobile app that can only refresh every 3h or so.

Install

pip install librusapi

Tech used

  • written in python developed with 3.9 in mind

  • requests library for fetching data, mainly html

  • BeautifulSoup4 library for parsing the data

Development specific

  • mypy for type checking

  • pytest for running tests

  • pdoc for creating html documentation

Quick start

Example usage of the API

Getting the timetable

from librusapi.token import get_token
from librusapi import timetable

token = get_token('username', 'password')
lesson_units = timetable.lesson_units(token)

for lu in lesson_units:
    print(lu)

Listing messages

from librusapi.token import get_token
from librusapi import messages

token = get_token('username', 'password')
messages = messages.list_messages(token)

for msg in messages:
    print(msg)

Documentation

Docs can be found here

Working on the project

git clone https://github.com/ravensiris/librusapi
cd librusapi
python -m venv venv
# This may be different depending on your operating system and shell
source ./venv/bin/activate
pip install -r requirements.txt
# Installing as an editable library
pip install -e .

Now you can import librusapi in your project

Generating docs

pdoc --html librusapi

Status

Currenty you can:

  • Authenticate and get a token

  • List all lessons in a timetable

  • List all messages ( can’t read them yet )

Copyright 2021 Maksymilian Jodłowski

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Release files for librusapi 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for librusapi 0.0.5
File Size Uploaded
librusapi-0.0.5.tar.gz 10.1 kB Details

Release files / librusapi-0.0.5.tar.gz

Download URL librusapi-0.0.5.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a860fcdee586eafccbc37fd4e51ec0a254cd7d8ff910bc3588763783b671d55c
BLAKE2b-256 checksum
How to use checksums
22752a02bcee5cef17513a126791b172939a7698e015195e04347fb874db6aab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page