This is the Python API for the ESPRIT-TN website. It is used to interact with the ESPRIT-TN Website.
To install the API, you can use pip
(Currently working on a PyPI package)
To install, you have to place the file esprit_tn.py inside of your project. Make sure to install the requirements inside requirements.txt!
To use the API, you need to import the esprit class from the esprit_tn module:
from esprit_tn import espritThen, you can create an instance of the esprit class:
instance = esprit(username,password)You can then use the instance to interact with the ESPRIT-TN website.
Here is an example of how to use the API:
from esprit_tn import esprit
instance = esprit("username","password")
# Get the page's HTML content
response = instance.getSess().get("https://esprit-tn.com/ESPOnline/Etudiants/Accueil.aspx")
# Print the response
print(response.text)There is an example also of getting the grades of the student in marks_example.py file.
This is created for educational purposes. I am not responsible for any damages caused by this package. Use at your own risk. I Personally don't use this, I just created it to explore and understand how I can manipulate through web pages using Home Assistant with PyScript.
This project is licensed under the MIT License - see the LICENSE file for details.