DSBApi
Eine API für die DSBMobile Vertretungsplan-Lösung, welche viele Schulen benutzen.
- Python 3
- Funktioniert Stand 02.10.2020 (Jetzt via Android-API (nach Problemen in 0.0.3), seit 2015 stable
- Aktuell in Version 0.0.13
- Aktuell stable
- Units 2020 nicht vollständig unterstützt, PRs welcome, aber Kompatibilität berücksichtigen!
Installation:
pip3 install dsbapipy
oder manuell vom Source Code.
Datensatz:
JSON Liste an Arrays. Ein Array sieht so aus:
| Key | Value | Notiz |
|---|---|---|
type |
Vertretung |
Art des Eintrags |
class |
5D |
Klasse |
lesson |
12 |
Schulstunde |
room |
R404 |
(Neuer) Raum |
new_subject |
M-GK1 |
Neuer Kurs |
subject |
IF-LK4 |
Ursprüngliches Fach / Kurs |
new_teacher |
NEUM |
Neuer Lehrer |
teacher |
BIMM |
Ursprünglicher Lehrer |
date |
01.01.2019 |
Datum |
day |
Montag |
Wochentag |
updated |
02.02.2019 12:13 |
Letztes Update |
Implementierung:
Beispiel 1
import dsbapi
dsbclient = dsbapi.DSBApi("username", "password")
entries = dsbclient.fetch_entries() # Rückgabe einer JSON Liste an Arrays
print(entries[0]["date"]) # Datum des ersten Eintrags
Beispiel 2: Anderes Tabellenformat
Schulen sind relativ frei in der Gestaltung Ihrer Datensätze. Daher kann der oben beschriebene Standard wiefolgt überschrieben werden:
import dsbapi
ownFields = ['class','lesson','new_subject','room','subject','new_teacher','type','text']
dsbclient = dsbapi.DSBApi("username", "password", tablemapper=ownFields)
entries = dsbclient.fetch_entries() # Rückgabe einer JSON Liste an Arrays
print(entries[0]["date"]) # Datum des ersten Eintrags
Release files for dsbapipy 0.0.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dsbapipy-0.0.13.tar.gz | 4.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dsbapipy-0.0.13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.7 kB
Release files / dsbapipy-0.0.13.tar.gz
| Download URL | dsbapipy-0.0.13.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc52806f0e12a009fb215463c72212db209752bc78385b9df92ba993908d37d2
|
|
BLAKE2b-256 checksum How to use checksums |
72f3948c6bcb25e2e9d53c9ae9bbe0ab6426109599ca5fb695cd60fe04fc5221
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
|
Release files / dsbapipy-0.0.13-py3-none-any.whl
| Download URL | dsbapipy-0.0.13-py3-none-any.whl |
|---|---|
| Size | 16.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
999654806bf9e925a2431157d73c2a1b9b2a56cf79672707114e76271f963107
|
|
BLAKE2b-256 checksum How to use checksums |
952689340d84c52ff143702c185dc3908067edf96fb79d0123d16a3a765d3d83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
|