Skip to main content

Ecole Directe API

PyPI Python Version License

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.

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())

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Metadata

Release files for ecoledirecte 0.3.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 ecoledirecte 0.3.1
File Size Uploaded Provenance
ecoledirecte-0.3.1.tar.gz 21.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ecoledirecte 0.3.1
File Interpreter ABI Platform
ecoledirecte-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 43.2 kB

Release files / ecoledirecte-0.3.1.tar.gz

Download URL ecoledirecte-0.3.1.tar.gz
Size 21.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3da75f23f6492c07c48dc1efc4c9d90c5888fcf0f71354d9f193ed2616659723
BLAKE2b-256 checksum
How to use checksums
769617bad579feba8130c1b2d901aab16574122c5342fd2bd42c813a0db9ecb7
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 14, 2026.

Transparency log

Release files / ecoledirecte-0.3.1-py3-none-any.whl

Download URL ecoledirecte-0.3.1-py3-none-any.whl
Size 21.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
217e9cc423f2a48155040972c0a440213a5b151a4f9d4bc1ec89e3eca9e2f662
BLAKE2b-256 checksum
How to use checksums
88c4af30ad46922149454c284e200248d8ac9732bf2a397f85c6525eb72b9bc0
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 14, 2026.

Transparency log

Security for ecoledirecte 0.3.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ecoledirecte-0.3.1.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 14, 2026.

Transparency log

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.3.1 This release

2 release files Full 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