Python client for the WebUntis public timetable REST API (no authentication required)
Project description
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_namePeriod—date,start_time,end_time,subjects,teachers,rooms,classes,lesson_id, ...Element—type(ElementType),id,name,long_name,alternate_nameWeeklyTimetable—class_id,week_start,periodsSemesterTimetable—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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file webuntis_public-0.2.0.tar.gz.
File metadata
- Download URL: webuntis_public-0.2.0.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74f9460ad7f8994951e845d2266aac6344a4399e5a8aefeef488f310a3e5ba00
|
|
| MD5 |
12dd6f78e6eb7fc5c36e8203709496c6
|
|
| BLAKE2b-256 |
155307dfcdacacdffefcaad3b29b371ba1bf0a71d24dd2fff96f02f160b62eac
|
Provenance
The following attestation bundles were made for webuntis_public-0.2.0.tar.gz:
Publisher:
publish.yml on mklemmingen/webuntis-public
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
webuntis_public-0.2.0.tar.gz -
Subject digest:
74f9460ad7f8994951e845d2266aac6344a4399e5a8aefeef488f310a3e5ba00 - Sigstore transparency entry: 1006649277
- Sigstore integration time:
-
Permalink:
mklemmingen/webuntis-public@08091a139b25b84ffb5f7748e289e847feff7357 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/mklemmingen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@08091a139b25b84ffb5f7748e289e847feff7357 -
Trigger Event:
push
-
Statement type:
File details
Details for the file webuntis_public-0.2.0-py3-none-any.whl.
File metadata
- Download URL: webuntis_public-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06417ffccc19fa0154873e87e24e0a722d4b305fad0e32029c2ddbcfadec1cda
|
|
| MD5 |
2e8f4aeb8b045da11a09548e8c931be4
|
|
| BLAKE2b-256 |
b07ac32b1362a0c6173bfb534267556c300b333d485ccc051bbebda058e17805
|
Provenance
The following attestation bundles were made for webuntis_public-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on mklemmingen/webuntis-public
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
webuntis_public-0.2.0-py3-none-any.whl -
Subject digest:
06417ffccc19fa0154873e87e24e0a722d4b305fad0e32029c2ddbcfadec1cda - Sigstore transparency entry: 1006649278
- Sigstore integration time:
-
Permalink:
mklemmingen/webuntis-public@08091a139b25b84ffb5f7748e289e847feff7357 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/mklemmingen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@08091a139b25b84ffb5f7748e289e847feff7357 -
Trigger Event:
push
-
Statement type: