Skip to main content

A simple parser for Heinrich-Hertz-Schule, Hamburg, class substitution schedule

Project description

hhs-vertretungsplan

Python parser for the Heinrich-Hertz-Schule, Hamburg, Vertretungsplan interface

Retrieves latest status of classes being substituted.

Ask your Elternvertreter for username and password.

Usage:

import aiohttp
import asyncio
import sys
from hhs_vertretungsplan_parser.vertretungsplan_parser import HHSVertretungsplanParser

async def main(user: str, password: str):
    async with aiohttp.ClientSession() as session:
        hhs = HHSVertretungsplanParser(session, user, password)
        await hhs.load_data()
        for vertretung in hhs.vertretungen:
            print(f"Klasse {vertretung.klasse} hat am {vertretung.datum} in Stunde {vertretung.stunde} im Fach {vertretung.fach} bei {vertretung.vertreter} Vertretung.")

if (__name__ == '__main__'):
    # on Windows add:
    # asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
    if len(sys.argv) == 3:
        asyncio.run(main(sys.argv[1], sys.argv[2]))
    else:
        print(f"usage: python hhs-vertretungsplan.py <user> <password>")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hhs-vertretungsplan-parser-0.1.4.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page