Skip to main content

pyedookit

PyPI CI

Unofficial async Python client for the Edookit parent portal (https://<school>.edookit.net) used by Czech schools. It powers the ha-edookit Home Assistant integration and works standalone.

Edookit's REST API only works if a school administrator enables it, so this library signs in like a parent does (Plus4U OIDC, no browser) and reads the portal's pages. Edookit doesn't support it, and a change to the portal's markup can break a parser until it's updated.

Install

pip install pyedookit

Requires Python 3.12+.

Usage

import asyncio
from pyedookit import EdookitClient, login

async def main():
    session = await login("zs-example", "parent@example.com", "hunter2")
    client = EdookitClient(session)
    for lesson in await client.get_timetable():
        print(lesson.start, lesson.subject, lesson.room)

asyncio.run(main())
Call Returns
get_timetable() this week's Lessons, times in PORTAL_TZ (Europe/Prague)
get_timetable_week(week_offset=0) a TimetableWeek: lessons plus the bell-schedule periods; offset 1 is next week
get_events() upcoming SchoolEvents; all-day events have date start/end, end inclusive
get_payments() Payments totals and requests, amounts as Decimal
fetch_page(name) raw HTML of a page without a parser yet (CAPTURE_PAGES)

content_fingerprint(html) tells you when such a page's content changed.

Sessions

The password is only used by login(). Store session.to_json() instead, and treat it like a password: it holds the Plus4U sign-in. Its cookie is set for 30 days from login() (session.plus4u_expires_at tells you when, or is None if that's unknown or already past). Load it with Session.from_json(); sessions stored by 0.3.x still load.

EdookitClient renews the short-lived edookit session by itself and retries once. Pass on_session_update to persist each renewed session:

client = EdookitClient(session, on_session_update=lambda s: save(s.to_json()))

Only when Plus4U answers that the user has to sign in again do calls raise AuthError, and you need login() again. A renewal that fails for any other reason (Plus4U or the portal erroring, a maintenance page) raises EdookitConnectionError, so a passing outage doesn't cost the user a login.

Exception Meaning What to do
SessionExpired still expired right after a renewal retry later
AuthError bad credentials, or Plus4U wants a new login login()
EdookitConnectionError network error, 30 s timeout, or a failed renewal retry later
ParseError the portal's markup changed the parser needs updating

All of them derive from EdookitError. login(), refresh() and EdookitClient accept an http: aiohttp.ClientSession to reuse. Create it with cookie_jar=aiohttp.DummyCookieJar(): cookies are handled per host by hand, and a real jar would resend them.

Limitations

  • Current week only. The portal ignores week_offset=1, and the real week-navigation parameter hasn't been found yet. A browser HAR trace of clicking the next-week arrow would solve it; scripts/capture_fixtures.py captures portal HTML.
  • Cancelled and changed lessons are unverified. No real capture has had one yet, so Lesson.is_changed and is_cancelled are always False.
  • Unpaid payment requests are unverified. Only paid ones have been seen. A request without the "accepted" marker is reported as unpaid.

Development

uv sync --group dev
uv run pytest
uv run ruff check .
uv run mypy src

To release, bump version in pyproject.toml and push a vX.Y.Z tag. The publish workflow checks that the tag matches the version, then tests, builds and uploads to PyPI with trusted publishing.

Metadata

Release files for pyedookit 0.5.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 pyedookit 0.5.1
File Size Uploaded Provenance
pyedookit-0.5.1.tar.gz 30.6 kB With provenance Details

Built distribution (wheel)

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

Total release size: 53.6 kB

Release files / pyedookit-0.5.1.tar.gz

Download URL pyedookit-0.5.1.tar.gz
Size 30.6 kB
Tags Source
SHA-256 checksum
How to use checksums
41616d8572010713e55772fa7e601c9abfbd8b233cc8c565110ec29749062ebd
BLAKE2b-256 checksum
How to use checksums
8bf6a9f726ad91901727bbada55d8a1cad5fb03d9458199967070d6a160625c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 16, 2026.

Transparency log

Release files / pyedookit-0.5.1-py3-none-any.whl

Download URL pyedookit-0.5.1-py3-none-any.whl
Size 23.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd0bf8cb51f5bd1fdadfcf2e31b51ef040debce9be817e73cc8a6ee8b54dbb33
BLAKE2b-256 checksum
How to use checksums
7b5273264631f15b1a21599eab7b5cbbc62e18a89144cd163a66b1d90534a3d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 16, 2026.

Transparency log

Security for pyedookit 0.5.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 pyedookit-0.5.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 Oct 16, 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.

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