Skip to main content

======= ClasseVivaAPI - Python =======



Informazioni

ClasseVivaAPI è una libreria Python che permette di utlizzare l'API di Classeviva - GruppoSpaggiariParma per ottenere informazioni come Voti, Note e Documenti, relative ad un account ClasseViva.



Installa ClasseVivaAPI da PyPI

pip install CVV-API



Utilizzo

Richiedi i VOTI di un utente (richiesta senza parametri):

from ClasseVivaAPI import Utente, RequestURLs

utente = Utente(uid="USERNAME", pwd="PASSWORD")  # Crea un Utente utilizzando USERNAME e PASSWORD del tuo account ClasseViva
utente.login()  # Effetua l'accesso all'account, verificando che i dati inseriti siano corretti

voti = utente.request(RequestURLs.voti)  # Richiesta all'API (utente.request()) di ottenere i VOTI (ReqeusteURLs.voti) dell'utente dal quale si effettua la richiesta
print(voti.json())  # Stampa il risultato della richiesto nella console, in formato JSON

Richiedi l'AGENDA di un utente (richiesta con parametri):

from ClasseVivaAPI import Utente, RequestURLs

utente = Utente(uid="USERNAME", pwd="PASSWORD")  # Crea un Utente utilizzando USERNAME e PASSWORD del tuo account ClasseViva
utente.login()  # Effetua l'accesso all'account, verificando che i dati inseriti siano corretti

voti = utente.request(RequestURLs.agenda, (20230301, 20230302))  # Richiesta all'API (utente.request()) di ottenere l'AGENDA (RequestURLs.agenda) dell'utente dal quale si effettua la richiesta, inserendo la data di inizio e di fine in formato AAAAMMGG (Esempio: '20230301' = 1 Marzo 2023)
print(voti.json())  # Stampa il risultato della richiesto nella console, in formato JSON





Utente

Rappresenta un utente di ClasseViva (di tipo studente)



Classe

class Utente()



Costruttore

def __init__(
  self,
  uip: str,
  pwd: str
) -> None:

   Parametri:

   - uid: Username dell'utente

   - pwd: Password dell'utente



Attributi:

  • self.uid: Username dell'utente
  • self.pwd: Password dell'utente
  • self.ident: Identificato dell'utente
  • self.token: Token della sessione
  • self.is_logged_in: Indica se l'utente ha effettuato l'accesso o meno



Metodi:

  • self.login(): Effettua l'accesso alla sessione di ClasseViva
  login(self) -> Response
  • self.request(): Invia una richiesta all'API di ClasseViva
  request(self, request_url: tuple, parmas=None) -> Response





RequestURLs

Rappresenta la lista di URL disponibili per le richieste all'API di ClasseViva



Classe

class RequestURLs()



Attributi:

  • self.base_url: URL di base per le richieste all'API di ClasseViva
  • self.students_url: URL di base per le richieste relative agli studenti

  • self.assenze: URL per ottenere le informazioni sulle assenze
  • self.agenda: URL per ottenere le informazioni sull'agenda
  • self.didattica: URL per ottenere le informazioni sulla didattica
  • self.libri: URL per ottenere le informazioni sui libri scolastici
  • self.calendario: URL per ottenere le informazioni sul calendario
  • self.card: URL per ottenere le informazioni sulla card dello studente
  • self.voti: URL per ottenere le informazioni sui voti
  • self.lezioni_oggi: URL per ottenere le informazioni sulle lezioni del giorno
  • self.lezioni_giorno: URL per ottenere le informazioni sulle lezioni di un giorno specifico
  • self.note: URL per ottenere le informazioni sulle note
  • self.periods: URL per ottenere le informazioni sui periodi
  • self.materie: URL per ottenere le informazioni sulle materie
  • self.login URL per effettuare il login
  • self.noticeboard: URL per ottenere le informazioni sulla bacheca
  • self.documenti: URL per ottenere le informazioni sui documenti





Contributi e Supporto

Se hai idee per migliorare questa libreria o hai riscontrato problemi, puoi contribuire aprendo issue o pull request su GitHub. Sarò felice di ricevere feedback e aiutarti nelle tue implementazioni.



Licenza

Questa libreria è rilasciata con la licenza MIT License.

Buon utilizzo della libreria ClasseVivaAPI!

Metadata

Release files for CVV-API 0.1

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

Source distribution (sdist)

Source distribution for CVV-API 0.1
File Size Uploaded Provenance Actions
CVV-API-0.1.tar.gz 4.0 kB Without provenance Details for CVV-API-0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for CVV-API 0.1
File Interpreter ABI Platform Actions
CVV_API-0.1-py3-none-any.whl Python 3 none any Details for CVV_API-0.1-py3-none-any.whl

Total release size: 8.3 kB

Release files / CVV-API-0.1.tar.gz

Download URL CVV-API-0.1.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9d96bf33c4a3a6e0d125c7fe50d2588652b1c22c7a0479ee4fc0ec9008061bad
BLAKE2b-256 checksum
How to use checksums
8cbc9ba318d32dcb29d82d8732c419ecccf38ff04b97c89ea0c102b3a20e32af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release files / CVV_API-0.1-py3-none-any.whl

Download URL CVV_API-0.1-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b6c60f3862605f11c2519b45e5799cb2ab8fb049119d9b456128e6e39a84455d
BLAKE2b-256 checksum
How to use checksums
1a9c352f6be5cc7985feb03a6955a07b8cb4f74912c2320e01b879253d25e964
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Security for CVV-API 0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files No provenance

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