Basic python package for looking up existing and available lesson times on STR's Elevcentralen.
- Python 3.6+
- Pipenv
- Clone the repository using:
git clone - Install python environment:
pipenv install
The ElevCentralen class provides the basic functionality, and requires a user id. Authentication is provided by the authenticate method with the username and password.
Can be run via pipenv run python {SCRIPT NAME}
Shows of basic functionality. Grabs authentication from the environment variables (which can be easily injected via a .env file):
USERNAMEPASSWORDPERSON_IDTEACHER_ID
Simple script to check for available new times of your favorit teacher and send out a notifying email using mailgun. Does well to run in a crontab for periodic checking of new times. In addition to the variables above, this also requires
MAILGUN_URLMAILGUN_API_KEYMAILGUN_SENDERMAILGUN_RECEIVERS: comma separated list of recipients
It is probably easiest to grab these from your favorite web client inspector when logged in. Another way is to
- Login providing a dummy id
- Get current bookings using
get_current_bookings() - Grab id from one of the current bookings