edutap.esc_router_api
Async Python client for the ESC Router, the registry behind the European Student Card. It is where a higher education institution registers its students and the cards it issues them, and where anybody scanning a card's QR code is sent to ask whether that card is still valid.
Complete coverage of the router's V2 API: persons, cards, card pictures, the public status endpoint, offline and server-side card number minting, and the bulk import dry run.
Install
pip install edutap.esc_router_api
Python 3.13 or newer.
Use
from edutap.esc_router_api import ESCRouterClient
async with ESCRouterClient.from_settings() as client:
status = await client.get_card_status("25539be8-6423-103e-add8-988999978433")
print(status.status) # ACTIVE
Configuration comes from the environment, prefixed ESC_, or from a .env file:
ESC_API_KEY=your-key
# ESC_ENVIRONMENT=production # omit and you talk to the sandbox
The default is the sandbox, not production. A deployment that forgets the variable writes to a test register rather than to a live one.
In a service that already keeps an httpx2.AsyncClient, hand it in and it will be
borrowed rather than duplicated -- and not closed:
client = ESCRouterClient.from_settings(client=my_shared_httpx_client)
There is a module-level function per operation as well, for scripts and notebooks:
from edutap.esc_router_api.api import get_person
person = await get_person("urn:schac:personalUniqueCode:int:esi:lmu.de:12345")
Documentation
https://docs.edutap.eu/packages/edutap_esc_router_api/index.html
Start with the tutorial if the router is new to you, the
operation table if it is not, and
migrating to 0.1.0 if you are coming from an
earlier release -- fullName moved, failures raise instead of returning None, and three
picture operations that never worked now do.
Develop
make venv # .venv with the package and its dev dependencies
make lint # ruff check, ruff format --check, ty check
make test-local # the unit suite -- no network, well under a second
make docs # sphinx-build -W
make help # everything else
The unit suite never opens a socket: it drives the real client over an
httpx2.MockTransport. The tests that talk to a real router are held behind a marker --
see Run the integration tests.
Contributing
See CONTRIBUTING.md. Releases are described in RELEASING.md.
Licence
EUPL 1.2. See LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file edutap_esc_router_api-0.1.0.tar.gz.
File metadata
- Download URL: edutap_esc_router_api-0.1.0.tar.gz
- Upload date:
- Size: 81.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
188400d66cf4123a4c5db2c7110ce5a52a26a2069c7cfbcff839ccb7660f5cb5
|
|
| MD5 |
9a290d170043f14e50293f7081018d21
|
|
| BLAKE2b-256 |
a489dfcebb8ba057d366e87fdae482b2283704f1e646f542b3137fb00e018580
|
Provenance
The following attestation bundles were made for edutap_esc_router_api-0.1.0.tar.gz:
Publisher:
release.yaml on edutap-eu/edutap.esc_router_api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
edutap_esc_router_api-0.1.0.tar.gz -
Subject digest:
188400d66cf4123a4c5db2c7110ce5a52a26a2069c7cfbcff839ccb7660f5cb5 - Sigstore transparency entry: 2537037785
- Sigstore integration time:
-
Permalink:
edutap-eu/edutap.esc_router_api@b78746fe3753adc8fa2a560f37c35a3be04e6f34 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/edutap-eu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@b78746fe3753adc8fa2a560f37c35a3be04e6f34 -
Trigger Event:
release
-
Statement type:
File details
Details for the file edutap_esc_router_api-0.1.0-py3-none-any.whl.
File metadata
- Download URL: edutap_esc_router_api-0.1.0-py3-none-any.whl
- Upload date:
- Size: 28.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
deee2202ca1d32a25c20d11456a240379a9be50f3a895e2161907c81b4d41ca5
|
|
| MD5 |
cf2291c42d444f0ed7ad8a386282844a
|
|
| BLAKE2b-256 |
726429eb5f442d16a8a5e32c0c509fe0a7376f9052bc9045a2bbaa43146aa434
|
Provenance
The following attestation bundles were made for edutap_esc_router_api-0.1.0-py3-none-any.whl:
Publisher:
release.yaml on edutap-eu/edutap.esc_router_api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
edutap_esc_router_api-0.1.0-py3-none-any.whl -
Subject digest:
deee2202ca1d32a25c20d11456a240379a9be50f3a895e2161907c81b4d41ca5 - Sigstore transparency entry: 2537038042
- Sigstore integration time:
-
Permalink:
edutap-eu/edutap.esc_router_api@b78746fe3753adc8fa2a560f37c35a3be04e6f34 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/edutap-eu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@b78746fe3753adc8fa2a560f37c35a3be04e6f34 -
Trigger Event:
release
-
Statement type: