Project description
pyelternportal

Python client library to retrieve data provided by eltern-portal.org
Install
pip install pyelternportal
Demo school
With the school identifier "demo" you can try out the library without access data.
Example
Get the letters of the demo school.
import pyelternportal
api = pyelternportal.ElternPortalAPI()
api.set_config("demo", "", "")
api.set_option(letter=True)
await api.async_validate_config()
print(f"school_name:\t{api.school_name}")
await api.async_update()
print(f"last_update:\t{api.last_update}")
for student in api.students:
print("---")
print(f"student_id:\t{student.student_id}")
print(f"fullname:\t{student.fullname}")
print(f"firstname:\t{student.firstname}")
print(f"letters:\t{len(student.letters)}")
for letter in student.letters:
print(f"\tnumber:\t\t{letter.number}")
print(f"\tsent:\t\t{letter.sent}")
print(f"\tsubject:\t{letter.subject}")
API
Methods
| Method |
Description |
set_config, set_config_data |
Set the base configuration |
set_option, set_option_treshold, set_option_register, set_option_data |
Set the optional configuration |
async_validate_config |
Validate base config, set property school_name |
async_update |
Update data, set properties students and last_update |
set_config
Set the required configuration.
| Parameter |
Type |
Description |
school |
str |
School identifier for Eltern-Portal. A list of valid school identifiers can be found at SCHOOLS.md |
username |
str |
User name of the access data (e.g. e-mail address) |
password |
str |
Password of the access data |
set_config_data
Set the base configuration via a dictionary object.
| Parameter |
Type |
Description |
config |
Dict[str, str] |
The dictionary keys corresponds to the parameter names of set_config. |
set_option
Set the optional configuration.
| Parameter |
Type |
Default |
Description |
appointment |
bool |
False |
Get data of page "service/termine"? |
blackboard |
bool |
False |
Get data of page "aktuelles/schwarzes_brett"? |
lesson |
bool |
False |
Get data of page "service/stundenplan"? |
letter |
bool |
False |
Get data of page "aktuelles/elternbriefe"? |
message |
bool |
False |
Get data of page "meldungen/kommunikation_fachlehrer"? |
poll |
bool |
False |
Get data of page "aktuelles/umfragen"? |
register |
bool |
False |
Get data of page "service/klassenbuch"? |
sicknote |
bool |
False |
Get data of page "meldungen/krankmeldung"? |
set_option_treshold
Set the optional treshold values.
| Parameter |
Type |
Default |
Description |
blackboard_treshold |
int |
-7 |
Treshold value (relative to today) for black board sent |
letter_treshold |
int |
-7 |
Treshold value (relative to today) for letter sent |
message_treshold |
int |
-7 |
Treshold value (relative to today) for message sent |
register_treshold |
int |
+0 |
Treshold value (relative to today) for register completion |
sicknote_treshold |
int |
-7 |
Treshold value (relative to today) for sick note end |
set_option_register
Set the optional configuration for class register.
| Parameter |
Type |
Default |
Description |
register_start_min |
int |
-6 |
Start date (relative to today) (minimum) |
register_start_max |
int |
+5 |
Start date (relative to today) (maximum) |
register_show_empty |
bool |
False |
Show empty entries? |
set_option_data
Set the option data via a dictionary object.
| Parameters |
Type |
Description |
config |
Dict[str, Any] |
The dictionary keys correspond to the parameter names of set_option and set_option_register. |
Properties
| Property |
Type |
Description |
hostname |
str |
Hostname of the server |
base_url |
str |
Base url of the web site |
school_name |
str |
Name of the school presented on the welcome page |
students |
list[Student] |
List of students (or pupils) |
last_update |
datetime.datetime |
Timestamp of the last update of the data above |
Classes
Student
| Property |
Type |
Description |
student_id |
str |
Id of the student |
fullname |
str |
Full name of the student presented in the drop down list |
firstname |
str |
First name (extracted from fullname) |
lastname |
str |
Last name (extracted from fullname) |
classname |
str |
Class name (extracted from fullname) |
appointments |
list[Appointment] |
List of appointments (only if option appointment was set) |
blackboards |
list[BlackBoard] |
List of black board entries (only if option blackboard was set) |
lessons |
list[Lesson] |
List of lessons (only if option lesson was set) |
letters |
list[Letter] |
List of letters (only if option letter was set) |
messages |
list[Message] |
List of messages (only if option message was set) |
polls |
list[Poll] |
List of polls (only if option poll was set) |
registers |
list[Register] |
List of registers (only if option register was set) |
sicknotes |
list[SickNote] |
List of sick notes (only if option sicknote was set) |
Appointment
| Property |
Type |
Description |
appointment_id |
str |
Id of the appointment |
title |
str |
Title |
short |
str |
Short title |
classname |
str |
Class name |
start |
datetime.date |
Start (including) |
end |
datetime.date |
End (including) |
BlackBoard
| Property |
Type |
Description |
sent |
datetime.date |
Publication date |
subject |
str |
Subject |
body |
str |
Body |
attachment |
Attachment |
Attachment |
Lesson
| Property |
Type |
Description |
weekday |
int |
1=Monday ... 5=Friday |
number |
str |
Sequence number |
subject |
str |
Subject |
room |
str |
Room |
Letter
| Property |
Type |
Description |
letter_id |
str |
Id of the letter |
number |
str |
Number |
sent |
datetime.datetime |
Publication date and time |
new |
bool |
Is it new (or has it already been read)? |
attachment |
bool |
Has attachment? |
subject |
str |
Subject |
distribution |
str |
Distribution |
description |
str |
Description |
Message
| Property |
Type |
Description |
sender |
str |
Sender (teacher) |
sent |
datetime.datetime |
Date and time |
subject |
str |
Subject |
body |
str |
Body |
Poll
| Property |
Type |
Description |
title |
str |
Title |
href |
str |
Link to details |
attachment |
bool |
Has attachment |
vote |
datetime.datetime |
Vote date and time |
end |
datetime.datetime |
End date and time of runtime |
detail |
str |
Details |
Register
| Property |
Type |
Description |
subject |
str |
Subject |
short |
str |
Short subject |
teacher |
str |
Teacher |
lesson |
str |
Lesson |
substitution |
bool |
Was a substitution? |
empty |
bool |
Is empty? |
rtype |
str |
Type of register |
start |
datetime.date |
Start date (including) |
completion |
datetime.date |
Complete by date (including) |
description |
str |
Description |
SickNote
| Property |
Type |
Description |
start |
datetime.date |
Start date |
end |
datetime.date |
End date |
comment |
str |
Comment |
Attachment
| Property |
Type |
Description |
atype |
str |
Type of attachment: default or lesson |
aid |
int |
Id of attachment |
name |
str |
Name |
href |
str |
Link |
size |
float |
Size in KB |
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 pyelternportal-0.0.18.tar.gz.
File metadata
-
Download URL: pyelternportal-0.0.18.tar.gz
- Upload date:
-
Size: 65.4 kB
- Tags: Source
-
Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.7
File hashes
Hashes for pyelternportal-0.0.18.tar.gz
| Algorithm |
Hash digest |
|
| SHA256 |
bf6516384531fde764a1d6081b78f23d9ebb8676f04ca9059bfeb1637f862d8e
|
|
| MD5 |
351df66caee04ebc9828345d3e25975f
|
|
| BLAKE2b-256 |
90fe1052eb809effa7e571e59a3a983030aa5f5d858a6c94237b85fef1d42540
|
|
See more details on using hashes here.
File details
Details for the file pyelternportal-0.0.18-py3-none-any.whl.
File metadata
File hashes
Hashes for pyelternportal-0.0.18-py3-none-any.whl
| Algorithm |
Hash digest |
|
| SHA256 |
a9461930eb81eb149320cb0f67df819b2ed1dc025e24a2ae56db356c1f9ffb2b
|
|
| MD5 |
e63e0082b82418bd2aca7e0edbca59a2
|
|
| BLAKE2b-256 |
850107a4a1f0e00bff8b4328d153a96b75c702b8d3e5332d0d507c1a3e0de420
|
|
See more details on using hashes here.