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, which lasts about 19 days (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()))

When the Plus4U sign-in has expired too, calls raise AuthError and you need login() again.

Exception Meaning What to do
SessionExpired still expired right after a renewal retry later
AuthError bad credentials, or the Plus4U cookie expired login()
EdookitConnectionError network error or 30 s timeout 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.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 pyedookit 0.5.0
File Size Uploaded Provenance
pyedookit-0.5.0.tar.gz 29.4 kB With provenance Details

Built distribution (wheel)

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

Total release size: 51.6 kB

Release files / pyedookit-0.5.0.tar.gz

Download URL pyedookit-0.5.0.tar.gz
Size 29.4 kB
Tags Source
SHA-256 checksum
How to use checksums
25559abef409fb06ac0e09b07682afed2b1c27ee1be893b2c9b97d33083e3165
BLAKE2b-256 checksum
How to use checksums
7549fde52fa61e65514b8220a3361172fb9d828ef751f0655188397296dd7a0b
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.0-py3-none-any.whl

Download URL pyedookit-0.5.0-py3-none-any.whl
Size 22.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
14bb4f0c0bc76edf1e7d36a25b32abf1d4a17f734a6b6af2e4637fb341a3cb5c
BLAKE2b-256 checksum
How to use checksums
4dd73c73f2f9689c76e0cd8a984932179c581e016451d4944687165c64f48b6d
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.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 pyedookit-0.5.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 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