Giter Club home page Giter Club logo

classeviva's Introduction

Classeviva

Slow API for Classeviva by GruppoSpaggiariParma

Download

Classeviva is available on PyPI

$ python -m pip install classevivaAPI

Documentation

You can find the italian documentation on ReadTheDocs.io

Usage

Your YourFile.py could be written as follows:

#!\usr\bin\env python3
from classeviva import Session, Valutazioni, Note, Registro
from classeviva.variables import NoteSortBy


if __name__ == "__main__":
    s = Session("S<my-username>", "<my-password>", hidden=False)
    s.login()
    print(s.user)

    v = Valutazioni(s)
    print(v.subjects)
    print(v.get_valutations_marks())
    print(v.get_valutations(False, False, False))

    n = Note(s)
    print(n.get_notes(NoteSortBy.TYPE))
    print(n.lenght)

    r = Registro(s)
    print(d := r.Date.from_str("SABATO 31 GENNAIO 2022"))
    print(r.get_day_status(d))
    print(r.get_status(d, 1))
    print(r.get_status(d, 2))
    print(r.get_status(d, 5))

A sample output may be the following:

DevTools listening on ws://127.0.0.1:63746/devtools/browser/25500ad4-68de-4f15-b52a-08068382f340
User: S<my-username> | <my-password> | 58733881
Time-left: 3598s
S<my-username> | <my-password> | 58733881
["RELIGIONE CATTOLICA O ATTIVITA' ALTERNATIVE", 'SCIENZE NATURALI', 'LINGUA E CULTURA STRANIERA (INGLESE)', 'LINGUA E LETTERATURA ITALIANA', 'SCIENZE MOTORIE E SPORTIVE', 'INFORMATICA', "DISEGNO E STORIA DELL'ARTE", 'FISICA', 'MATEMATICA', 'FILOSOFIA', 'STORIA', 'EDUCAZIONE CIVICA']
[8.0, 9.0, 8.5, 8.5, 8.0, 8.0, 8.0, 'g', 7.0, 8.5, 8.0, 9.5, 10.0, 9.5, 8.5, 9.0, 8.0, 8.5, 8.0, 8.0, 8.0, 8.0, 8.0, 7.0, 9.0, 8.5, 8.0, 8.0, 10.0, 10.0, 10.0, 8.0, 9.5, 9.5, 8.0, 8.5, 8.0, 9.0, 8.5, 8.5, 8.0, 8.0, 8.0, 'g', 7.0, 8.5, 8.0, 9.5, 10.0, 9.5, 8.5, 9.0, 8.0, 8.5, 8.0, 8.0, 8.0, 8.0, 8.0, 7.0, 9.0, 8.5, 8.0, 8.0, 10.0, 10.0, 10.0, 8.0, 9.5, 9.5, 8.0, 8.5]
[("RELIGIONE CATTOLICA O ATTIVITA' ALTERNATIVE", 10.0), ('SCIENZE NATURALI', 10.0), ('SCIENZE NATURALI', 9.5), ('SCIENZE NATURALI', 10.0), ('LINGUA E CULTURA STRANIERA (INGLESE)', 7.5), ('LINGUA E CULTURA STRANIERA (INGLESE)', 8.5), ('LINGUA E CULTURA STRANIERA (INGLESE)', 8.5), ('LINGUA E LETTERATURA ITALIANA', 8.0), ('LINGUA E LETTERATURA ITALIANA', 8.5), ('LINGUA E LETTERATURA ITALIANA', 7.0), ('LINGUA E LETTERATURA ITALIANA', 8.5), ('SCIENZE MOTORIE E SPORTIVE', 9.0), ('SCIENZE MOTORIE E SPORTIVE', 8.0), ('SCIENZE MOTORIE E SPORTIVE', 8.5), ('INFORMATICA', 10.0), ("DISEGNO E STORIA DELL'ARTE", 10.0), ("DISEGNO E STORIA DELL'ARTE", 7.0), ('FISICA', 7.0), ('FISICA', 9.5), ('FISICA', 6.0), ('MATEMATICA', 9.0), ('MATEMATICA', 8.0), ('MATEMATICA', 9.0), ('MATEMATICA', 8.0), ('FILOSOFIA', 8.0), ('STORIA', 9.0), ('STORIA', 8.5), ('STORIA', 8.5), ('EDUCAZIONE CIVICA', 10.0), ('EDUCAZIONE CIVICA', 8.5)]
[('La classe oggi 2/04/22, esce alle 11.50.', 'SOMEBODY', '02-04-2022', 'Annotazione del docente'), ("La classe esce alle ore 12:45 per l'assenza della prof.ssa SOMEBODY", 'SOMEBODY', '03-05-2022', 'Annotazione del docente'), ('Compiti di Geometria non svolti', 'SOMEBODY', '12-02-2022', 'Richiamo (Compiti)')]
3
SABATO 31 GENNAIO 2022
1.0
0.2
1.0
1.0

The whole run should take around 21s.

classeviva's People

Contributors

flak-zoso avatar

Stargazers

 avatar

Watchers

 avatar

classeviva's Issues

Unread Notes

('Leggi', '<insert-teacher-here>', '03-05-2022', 'Annotazione del docente')

When the fist value returned by Note().get_notes() is 'Leggi', there's a green button to be clicked to show the real content.


There should be function, maybe an instance's method for class Note, which marks as read the unread notes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.