Skip to main content

Python API wrapper for Aula.

Project description

Aula

PyPI Python License

Async Python client for the Danish school platform aula.dk.

  • Fetch calendar events, messages, posts, and daily overviews
  • Authenticate via Denmark's MitID national identity system
  • Token caching — MitID app approval only needed on first login
  • Full async API client (AulaApiClient) and a CLI included

Installation

pip install aula
# or with uv
uv add aula

Requirements: Python >= 3.10, MitID username and MitID app.

Run without installing

Use uvx to run the CLI directly from PyPI without a permanent install:

uvx aula --username johndoe messages --limit 5

Install from Source

git clone https://github.com/nickknissen/aula.git
cd aula
pip install -e .

Quick Start

import asyncio
from aula import FileTokenStorage
from aula.auth_flow import authenticate_and_create_client

async def main():
    token_storage = FileTokenStorage(".aula_tokens.json")
    async with await authenticate_and_create_client("your_mitid_username", token_storage) as client:
        profile = await client.get_profile()
        print(profile.display_name)
        for child in profile.children:
            overview = await client.get_daily_overview(child.id)

asyncio.run(main())

Key methods on AulaApiClient: get_profile(), get_daily_overview(child_id), get_message_threads(), get_messages_for_thread(thread_id), get_calendar_events(...), get_posts(...). See src/aula/api_client.py for the full list.

Authentication

What You Need

  • MitID username — your MitID username (not your Aula username). Find it at mitid.dk.
  • MitID app — installed and set up on your phone.

First Login

On first run you'll be prompted to approve the login in your MitID app. You may need to scan a QR code or enter an OTP shown in the terminal. Tokens are saved to the storage file and reused on subsequent runs — no app interaction needed until they expire.

Token Security

Tokens provide full access to your Aula account — treat them like passwords and never commit token files to version control.

CLI

aula --username <your_mitid_username> [COMMAND]

The username can also be set via the AULA_MITID_USERNAME environment variable or a config file (~/.config/aula/config.json).

Command Description
login Verify credentials
profile Show profile and children
overview Daily overview for all children
messages Recent message threads
calendar Calendar events
posts Posts and announcements

Example:

aula --username johndoe messages --limit 5
# or without installing
uvx aula --username johndoe messages --limit 5

License

MIT

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

aula-0.1.1.tar.gz (79.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aula-0.1.1-py3-none-any.whl (52.4 kB view details)

Uploaded Python 3

File details

Details for the file aula-0.1.1.tar.gz.

File metadata

  • Download URL: aula-0.1.1.tar.gz
  • Upload date:
  • Size: 79.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aula-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f60978fd14a69c5b2507c9505a5f91b2a68c3e411d6abb5c1dcba9e2fe4d9bb6
MD5 20cab9f03948ff093a7d3f259297d3f6
BLAKE2b-256 ed1e333e02cf92a99c1ceec8a9437fbf7c24e59102b700ba53cfd0dafd554421

See more details on using hashes here.

Provenance

The following attestation bundles were made for aula-0.1.1.tar.gz:

Publisher: publish.yml on nickknissen/aula

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aula-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: aula-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 52.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aula-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 54452a1ea5a21033ff9302d47461d6d2a9dd544d1c0ef9a1e2b192cc5a8d8e60
MD5 d63304f95c2ce5f4a262f2bb6a5c92ad
BLAKE2b-256 ce785231183ee324b00debe7f155e7264437c184d10074527e088a4bfcbc08ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for aula-0.1.1-py3-none-any.whl:

Publisher: publish.yml on nickknissen/aula

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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