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.4.0

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.4.0
File Size Uploaded Provenance
ecoledirecte-0.4.0.tar.gz 22.4 kB With provenance Details

Built distribution (wheel)

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

Total release size: 44.8 kB

Release files / ecoledirecte-0.4.0.tar.gz

Download URL ecoledirecte-0.4.0.tar.gz
Size 22.4 kB
Tags Source
SHA-256 checksum
How to use checksums
723fa45023f63323997e5e629c030545c5b335f14bd1f5a0a09c4866125ab38f
BLAKE2b-256 checksum
How to use checksums
8fa859f361c9b7504bbfa4361c19e06818681b38f27c4b741016d477c296298e
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 Oct 11, 2026.

Transparency log

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

Download URL ecoledirecte-0.4.0-py3-none-any.whl
Size 22.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1fe8762f782db8c198416a842711fd78bacd818df03914ec186d94326bcb4b4
BLAKE2b-256 checksum
How to use checksums
c827468ba7f6c211480bf21b3293c44e3a4ec167e5ee129047a09e580a361c8d
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 Oct 11, 2026.

Transparency log

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

Full provenance

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

Select from 2 files

Attestation for ecoledirecte-0.4.0.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 Oct 11, 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.4.0 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