Ecole Directe API
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.
Free software: GNU General Public License v3
Documentation: https://ecoledirecte-api.readthedocs.io.
Features
TODO
Installation
$ pip install ecoledirecte
Getting started
import asyncio
import json
import logging
from pathlib import Path
from ecoledirecte_api.client import EDClient
from ecoledirecte_api.exceptions import BaseEcoleDirecteException
logger = logging.getLogger(__name__)
async def save_question(qcm_json):
"""Save question to file."""
with Path("qcm.json").open(
"w",
encoding="utf-8",
) as fp:
json.dump(qcm_json, fp, indent=4, ensure_ascii=False)
logger.info("Saved question to file", qcm_json)
async def main():
logging.basicConfig(filename="myapp.log", level=logging.DEBUG)
logger.info("Started")
try:
qcm_json = {}
with Path("qcm.json").open(
"r",
encoding="utf-8",
) as fp:
qcm_json = json.load(fp)
async with EDClient(
"user", "password", qcm_json
) as client:
client.on_new_question(save_question)
l = await client.login()
logger.info(f"l= {l}")
logger.info(f"Logged in as {client.username}")
logger.info("Finished")
await client.close()
except BaseEcoleDirecteException as e:
logger.exception(e.message)
return
except Exception as e:
logger.exception(e)
return
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
Development - DevContainer (recommended)
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!
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
Metadata
Release files for ecoledirecte 0.3.2
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 | |
|---|---|---|---|---|
| ecoledirecte-0.3.2.tar.gz | 22.1 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ecoledirecte-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.2 kB
Release files / ecoledirecte-0.3.2.tar.gz
| Download URL | ecoledirecte-0.3.2.tar.gz |
|---|---|
| Size | 22.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b57b686db62e77b2f4fa73ab6f9e29177f216bcf39fe3c9635c86e8949e655d1
|
|
BLAKE2b-256 checksum How to use checksums |
c7b2fdef7e9897efd46b0c6af75223c47b9f53f9d06fd3bc35613882e5fa8519
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.
Transparency logRelease files / ecoledirecte-0.3.2-py3-none-any.whl
| Download URL | ecoledirecte-0.3.2-py3-none-any.whl |
|---|---|
| Size | 22.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
14eb1078f7ff94d2413468a7f96b9e1491636c291bb01cd7706452384ec35956
|
|
BLAKE2b-256 checksum How to use checksums |
2320d3f033c4a22ede89dd9326efd22f3a1047f25a257fd8a130b1307ea8d328
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.
Transparency logSecurity for ecoledirecte 0.3.2
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for ecoledirecte-0.3.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.
Transparency logA 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.