Skip to main content

webuntis-public

Python client for the WebUntis public timetable REST API. No authentication or API key required.

Installation

pip install webuntis-public

Quick Start

from webuntis_public import WebUntisPublicClient

# Connect to any WebUntis school
client = WebUntisPublicClient("hs-reutlingen.webuntis.com")

# List all available classes
classes = client.list_classes()
for c in classes[:5]:
    print(f"{c.id}: {c.name} ({c.long_name})")

# Search for classes by name
mkib = client.find_classes("MKIB")

# Fetch a single week
from datetime import date
week = client.fetch_week(class_id=21893, date=date(2026, 3, 2))
for period in week.periods:
    subj = ", ".join(s.name for s in period.subjects)
    print(f"  {period.date} {period.start_time}-{period.end_time}: {subj}")

# Fetch an entire semester
semester = client.fetch_semester(
    class_id=21893,
    start=date(2026, 3, 2),
    end=date(2026, 7, 5),
)
print(f"Total periods: {len(semester.periods)}")

API Reference

WebUntisPublicClient(server, *, school=None, rate_limit=0.3)

Create a client for the given WebUntis server hostname.

Methods:

Method Description
list_classes() Returns all ClassGroup entries on the server
find_classes(pattern) Case-insensitive search for class groups by name
fetch_week(class_id, date) Fetch one week of timetable data
fetch_semester(class_id, start, end) Fetch all weeks in a date range

Data Models

All models are frozen dataclasses:

  • ClassGroup — id, name, long_name
  • Period — date, start_time, end_time, subjects, teachers, rooms, classes, lesson_id, ...
  • Element — type (ElementType), id, name, long_name, alternate_name
  • WeeklyTimetable — class_id, week_start, periods
  • SemesterTimetable — class_id, start, end, weeks, periods (property)

Utility Functions

  • parse_date(int) -> date — e.g. 20260302 -> date(2026, 3, 2)
  • parse_time(int) -> time — e.g. 800 -> time(8, 0)
  • format_date(int) -> str — e.g. 20260302 -> "2026-03-02"
  • format_time(int) -> str — e.g. 800 -> "08:00"
  • iter_mondays(start, end) — yield all Mondays in range

License

Apache-2.0

Metadata

Release files for webuntis-public 0.2.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 webuntis-public 0.2.0
File Size Uploaded Provenance
webuntis_public-0.2.0.tar.gz 14.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for webuntis-public 0.2.0
File Interpreter ABI Platform
webuntis_public-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.8 kB

Release files / webuntis_public-0.2.0.tar.gz

Download URL webuntis_public-0.2.0.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
74f9460ad7f8994951e845d2266aac6344a4399e5a8aefeef488f310a3e5ba00
BLAKE2b-256 checksum
How to use checksums
155307dfcdacacdffefcaad3b29b371ba1bf0a71d24dd2fff96f02f160b62eac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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 Mar 1, 2026.

Transparency log

Release files / webuntis_public-0.2.0-py3-none-any.whl

Download URL webuntis_public-0.2.0-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06417ffccc19fa0154873e87e24e0a722d4b305fad0e32029c2ddbcfadec1cda
BLAKE2b-256 checksum
How to use checksums
b07ac32b1362a0c6173bfb534267556c300b333d485ccc051bbebda058e17805
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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 Mar 1, 2026.

Transparency log

Security for webuntis-public 0.2.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 webuntis_public-0.2.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 Mar 1, 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.2.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