aula_connect
A Python client for Aula, the Danish school and institution platform. It logs in through MitID - with the MitID app's QR code or code - and reads the children's profiles, daily overviews (presence), calendars, birthdays, messages, notifications, weekly plans (Meebook, EasyIQ, MinUddannelse) and newsletters into typed models.
It is the library the Home Assistant integration ha_aula_connect is built on.
It is asynchronous, and runs on the aiohttp session the caller gives it. A login's cookies are its own, so each login and each client has a session of its own, not one shared with other services:
import aiohttp
from aula_connect import AulaClient, AulaLoginClient
async with aiohttp.ClientSession() as session:
login = AulaLoginClient(session, mitid_username="...") # approve in the MitID app
tokens = (await login.authenticate())["tokens"]
client = AulaClient(
session,
access_token=tokens["access_token"],
refresh_token=tokens["refresh_token"],
expires_at=tokens["expires_at"],
mitid_username="...",
login_client=login,
)
data = await client.login()
While the login runs, login.get_qr_codes_svg() gives the two QR codes to show in turn for the
MitID app to scan.
What Aula sends
A client keeps the newest answer to each request it sends Aula and its widgets, with its headers and when it came, and the newest failure of each request that failed - an error's status, or an error in place of an answer, such as a timeout - even where a later answer succeeded. It keeps them in memory only, 200 answers and 50 failures at most, and never a request's headers. To see what Aula sends, read everything once and take the answers with who someone is replaced:
failed = await client.read_everything(start, end) # what could not be read, and why
answers = client.responses(key) # key: bytes kept secret, the same each time
answers holds Aula's API version, each request with its answer, and the type at each place of
each kind of answer, to see where Aula has changed. All the answers say is replaced, but how they
are built, so that they can be shared in public: every value gets another of the same length and
kinds of characters, the same one wherever it is and for as long as the key is the same, so that
what belongs together still does.
- Every word of every text, word by word, with capitals where it has them: names, messages, titles, notes and the rest.
- Ids, under their keys - an institution's and a municipality's code among them - and inside texts and links, and numbers that are known ids.
- E-mail addresses, phone numbers and CPR numbers anywhere, and addresses under their keys.
- The site of every link but Aula's and its widgets', the words of its path, and its query, as it can sign the link.
Kept is what tells how an answer is built: the keys; the values of a kind Aula names, such as a
message's type, a notification's area, a role or a status; names in code such as
NewMessagePrivateInbox; HTML's tags; dates and times; and numbers that are no ids. The path and
query of a request the client sends are kept but for their ids.
The MitID username and every token the client holds are hidden wherever they stand, as is what a request for a token answers, and any value under a key of a secret, a cookie among them, or that looks like a token: a text becomes as many "x", a number as many 9s.
The messages of every thread on the newest page are read, but not those of a thread Aula marks sensitive, which the client never reads.
client.anomalies(since=None) names what Aula sent that the client does not know or could not
read, each Anomaly once with its kind, its detail and when it was last_seen, the latest
first: a notification of an unknown area, an answer that could not be read, an answer in a shape
other than the one known (docs/aula-shapes.md), a version of Aula's API the client was not made
for, met again at each login while it lasts. None tells any of Aula's data,
so a caller can show them and ask for the answers when Aula changes; since, a time with its zone,
leaves out what was not met again since. A later minor version may add a kind, never rename or
remove one, so a caller handles a kind it does not know.
client.read(method, params, key, reveal=False, body=None) asks one method of Aula's API that
only gets, and gives its answer as responses gives one. aula_connect.methods lists every
method known to exist, and how each is asked (docs/aula-methods.md). A listed method is asked with its verb: GET, or POST with body as
JSON, such as calendar.getEventsByProfileIdsAndResourceIds. One not listed is asked with GET,
or POST where body is given, where it is named as one that gets, <area>.get<What> or
<area>.find<What>. reveal keeps the values under the keys it names as Aula sent them, such as
["widgetCategory"] to see a field of a module not known yet, or the whole answer with True;
the MitID username and every token are hidden all the same. What is revealed is no longer
anonymous: share it only in private. It raises MethodRefusedError, asking Aula nothing, for a
method that changes Aula, hands out a token, or gets the text of messages or secure documents,
whatever the case of its name; for a listed method asked with the other verb; and for params
or a body that name a method or a token.
aula_connect.testing has a simulated Aula for tests, on local test servers:
SimulatedAulaLogin answers the whole login chain - Aula's OAuth, UniLogin, NemLog-in and a
simulated MitID - and SimulatedAulaApi Aula's API and its widgets, with the data a test gives
it. Each checks the cookies, tokens and proofs the real one checks, and takes a
mitid_connect.testing.Network that gives each answer a latency and fails a share of them, for
stress tests.
Origin and licence
The login and API client come from the Home Assistant integration
HairingX/aula, a fork of
scaarup/aula, and are licensed as it is: GNU GPL v3.0 or later
(LICENSE). The MitID login started as the Aula login client by mchrdk. MitID itself is reached
through mitid_connect.
Metadata
Release files for aula-connect 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aula_connect-0.4.0.tar.gz | 159.8 kB | With provenance | Details for aula_connect-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aula_connect-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for aula_connect-0.4.0-py3-none-any.whl |
Total release size: 275.2 kB
Release files / aula_connect-0.4.0.tar.gz
| Download URL | aula_connect-0.4.0.tar.gz |
|---|---|
| Size | 159.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d7fd52de7ca4dbf27e333c3bda877349d4c5176a541c909e3103532ad459d7b1
|
|
BLAKE2b-256 checksum How to use checksums |
4cacce7f2c5af38164fcdcdf1100c1f1e8670c4adcba8dfc553fb15ab84d5ffe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logRelease files / aula_connect-0.4.0-py3-none-any.whl
| Download URL | aula_connect-0.4.0-py3-none-any.whl |
|---|---|
| Size | 115.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dc0877c8f58d402e7d1a9ca53ec7b0129f90c542d5214603ca52cab1fe98e600
|
|
BLAKE2b-256 checksum How to use checksums |
e8463987113e01990e21c497d4e1796366cec2ade406c938951639af398760ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logSecurity for aula-connect 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for aula_connect-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.