django-pronote
Handle CAS login for Pronote (index éducation)
Installation
Install from PyPI:
pip install django-pronote
Or, install with pip:
pip install -e git://github.com/briefmnews/django-pronote.git@main#egg=pronote
Setup
In order to make django-pronote works, you'll need to follow the steps below.
Settings
First you need to add the following configuration to your settings:
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.sessions',
'django.contrib.messages',
'pronote',
...
)
Mandatory settings
Here is the list of all the mandatory settings:
PRONOTE_API_KEY
PRONOTE_RESSOURCE_ID
PRONOTE_TERMS_AND_CONDITIONS_URL
PRONOTE_RESSOURCE_TITLE
PRONOTE_URL
Optional settings
The optional settings with their default values:
PRONOTE_RESSOURCE_OLD_ID (default: None)
PRONOTE_PUBLISHER (default: None)
PRONOTE_RESSOURCE_TYPE (default: None)
PRONOTE_FAMILY_ID = (default: None)
PRONOTE_FAMILY_LABEL = (default: None)
PRONOTE_FAMILY_JUSTIFICATION = (default: None)
PRONOTE_PERSONAL_INFORMATION_DEFINITION_DATA = (default: ())
PRONOTE_PERSONAL_INFORMATION_DEFINITION_JUSTIFICATION = (default: [])
PRONOTE_PUBLIC = (default: ())
PRONOTE_PUBLIC_QUOTAS = (default: [])
PRONOTE_DISCIPLINES = (default: ())
PRONOTE_MEFSTAT11 = (default: ())
PRONOTE_URL_MOBILE_APP = (default: None)
PRONOTE_API_SUPPORT = (default: ())
PRONOTE_DESCRIPTION = (default: None)
PRONOTE_KEYWORDS = (default: ())
Usage
Here is an example of output when running a GET method on /catalogue/1234?apiKey=test with the following settings:
PRONOTE_API_KEY = "test"
PRONOTE_RESSOURCE_ID = "briefme"
PRONOTE_TERMS_AND_CONDITIONS_URL = "https://www.brief.me/gar/cgu/"
PRONOTE_RESSOURCE_TITLE = "Brief.me"
PRONOTE_URL = "https://www.brief.me"
PRONOTE_PUBLISHER = "Brief.me"
PRONOTE_RESSOURCE_TYPE = "Manuel"
PRONOTE_FAMILY_ID = "1234"
PRONOTE_FAMILY_LABEL = "test label"
PRONOTE_FAMILY_JUSTIFICATION = "hello"
PRONOTE_PERSONAL_INFORMATION_DEFINITION_DATA = (["Nom", "Prenom"], ["Prenom"])
PRONOTE_PERSONAL_INFORMATION_DEFINITION_JUSTIFICATION = ["test 0", "test 1"]
PRONOTE_PUBLIC = ("Professeur", "Elèves")
PRONOTE_PUBLIC_QUOTAS = ["2", "3"]
PRONOTE_DISCIPLINES = ("041400", "040600")
PRONOTE_MEFSTAT11 = ("10010012110", "21110010012")
PRONOTE_URL_MOBILE_APP = "http://hello.com"
PRONOTE_API_SUPPORT = ("ajoutPanier", "renduPJTAF")
PRONOTE_DESCRIPTION = "Un test de description"
PRONOTE_KEYWORDS = ("key 1",)
Output
<?xml version="1.0" encoding="UTF-8"?>
<rn:catalogueEtab xmlns:rn="http://www.index-education.com/RessourcesNumeriques" xmlns:ex="http://www.index-education.com/RessourcesNumeriques/ExchangeTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.index-education.com/RessourcesNumeriques http://www.index-education.com/contenu/telechargement/partenaires/InterconnexionRessourcesNumeriquesV1_1.xsd" schemaVersion="1.1">
<ex:catalogueVersion>1.0</ex:catalogueVersion>
<ex:etabId>0133478Z</ex:etabId>
<ex:ressource>
<ex:id>9782701181431</ex:id>
<ex:oldId>15264836</ex:oldId>
<ex:familleId libelle="Famille resssources" justification="Justification corrélation multi-ressources">18ZE</ex:familleId>
<ex:editeur>EDITEUR</ex:editeur>
<ex:urlCgu>http://urlcgu</ex:urlCgu>
<ex:titre>Histoire</ex:titre>
<ex:genre>Manuel</ex:genre>
<ex:definitionDcp ident="0" justification="Justification transfert DCP">
<ex:dcp>Nom</ex:dcp>
<ex:dcp>Prenom</ex:dcp>
</ex:definitionDcp>
<ex:definitionDcp ident="1" justification="Justification transfert DCP">
<ex:dcp>Nom</ex:dcp>
<ex:dcp>Prenom</ex:dcp>
<ex:dcp>Classes</ex:dcp>
</ex:definitionDcp>
<ex:public identDefinitionDcp="0" quota="2">Professeur</ex:public>
<ex:public identDefinitionDcp="1">Eleve</ex:public>
<ex:matiereEnseignee>041400</ex:matiereEnseignee>
<ex:matiereEnseignee>040600</ex:matiereEnseignee>
<ex:mefstat11>10010012110</ex:mefstat11>
<ex:mefstat11>21110010012</ex:mefstat11>
<ex:url responsive="true">http://monurlderessource.php?idRessource=9782701181431</ex:url>
<ex:urlAppliMobile>http://monurlderessourceAppliMobile.php?idRessource=9782701181431</ex:urlAppliMobile>
<ex:apiSupport>ajoutPanier</ex:apiSupport>
<ex:apiSupport>renduPJTAF</ex:apiSupport>
<ex:description>description de la ressource</ex:description>
<ex:keyword>keyword1</ex:keyword>
<ex:keyword>keyword2</ex:keyword>
</ex:ressource>
</rn:catalogueEtab>
Tests
Testing is managed by pytest. Required package for testing can be installed with:
pip install -r test_requirements.txt
To run testing locally:
pytest
Metadata
Release files for django-pronote 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-pronote-0.1.0.tar.gz | 18.0 kB | Without provenance | Details for django-pronote-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_pronote-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for django_pronote-0.1.0-py3-none-any.whl |
Total release size: 37.1 kB
Release files / django-pronote-0.1.0.tar.gz
| Download URL | django-pronote-0.1.0.tar.gz |
|---|---|
| Size | 18.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
23e1198eabd0e5a7e09f46b810fb63ed2b9ee655910fd457af11178200635869
|
|
BLAKE2b-256 checksum How to use checksums |
e134ccdffd053343c3b966e7f773ea0294677d882b702f3a5457b9f09b210f4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / django_pronote-0.1.0-py3-none-any.whl
| Download URL | django_pronote-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1912bffa2128c3730a7de2efd223cb41acce98c01921439f8a543e822936178f
|
|
BLAKE2b-256 checksum How to use checksums |
ecf8976ed9f3e1187ff29d051f158591b9b86a252acf9807f4c914f6a0306ea3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for django-pronote 0.1.0
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.