A fully async and easy to use API client for the Ecole Directe API. This package is mainly used by Home Assistant, to offer the Ecole Directe integration. If you want to use this package in your own project, you can look at the Home Assistant Code for more examples.
- License: GNU Lesser General Public License v3 or later (LGPL-3.0-or-later)
- Documentation: https://ecoledirecte-api.readthedocs.io.
- Asynchronous client for authenticating with the Ecole Directe API.
- Access to messages, homework, grades, school-life records, and timetables.
- Access to account services such as wallet balances, surveys, forms, and workspaces.
- Automatic re-authentication for supported operations after session errors.
$ pip install ecoledirecteThis package requires Python 3.14 or later, below Python 4.0. This minimum is intentional: the package is primarily used by Home Assistant and follows its Python compatibility requirements.
import asyncio
from ecoledirecte_api.client import EDClient
async def main():
async with EDClient("username", "password", {}) as client:
await client.login()
homework = await client.get_homeworks("student_id")
print(homework)
if __name__ == "__main__":
asyncio.run(main())Replace the credentials and student ID with your own. If your account requires
QCM verification, provide the corresponding answers in the client's qcm_json
argument.
If you use Visual Studio Code with Docker or GitHub CodeSpaces, you can leverage the available devcontainer. This will install all required dependencies and tools and has the right Python version available. Easy!
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.