UIO API
A Python library for interacting with UIO APIs, featuring built‑in authentication, robust retries, secure token storage, and pagination utilities.
Documentation Map
- User Guide (usage, configuration, examples):
uio_api/README.md - Developer Guide (architecture, internals, patterns):
uio_api/INTERNAL.md
Features
- 🔐 Authentication: Interactive login, static tokens, or system accounts
- ⚡ Retries: Configurable retry strategy with exponential backoff
- 🛡️ Secure Storage: Keyring or TOML‑based token storage
- 📄 Pagination: DRF‑style pagination helpers and safeguards
Installation
pip install uio-api
Quick Start
from uio_api import mreg_client
from uio_api.modules.mreg.endpoints import Endpoint
with mreg_client() as m:
hosts = m.get_all(Endpoint.Hosts)
print(f"Found {len(hosts)} hosts")
For full usage, configuration, and advanced examples, see uio_api/README.md.
Token helpers
You can store credentials/tokens via the client instances (URLs resolved automatically):
from uio_api import mreg_client, nivlheim_client
# MREG: add system user (uses MREG_URL from config)
with mreg_client() as client:
client.add_system_user(username="svc", password="secret")
# MREG: add token with knobs (uses MREG_URL from config)
with mreg_client() as client:
client.add_token(
username="bob",
token="abc123",
scheme="Token",
timeout=60.0,
retry_attempts=5,
page_size=1000,
)
# Nivlheim: add API key (uses https://nivlheim.uio.no default)
with nivlheim_client() as client:
client.add_token(
username="svc",
token="apikey123",
scheme="APIKEY",
)
# Or use explicit URLs
with mreg_client() as client:
client.add_token(
username="bob",
token="abc123",
url="https://custom.mreg.uio.no"
)
Metadata
Release files for uio-api 0.1.1
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 |
|---|---|---|---|---|
| uio_api-0.1.1.tar.gz | 82.5 kB | Without provenance | Details for uio_api-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| uio_api-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for uio_api-0.1.1-py3-none-any.whl |
Total release size: 189.3 kB
Release files / uio_api-0.1.1.tar.gz
| Download URL | uio_api-0.1.1.tar.gz |
|---|---|
| Size | 82.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1daadf91dab309341a542c543d19a0ecc5e90e0ea66b772807e7232798958b8f
|
|
BLAKE2b-256 checksum How to use checksums |
f3c2e292e2c21b644873e946311678551aed319c23d4bfaca1a20dc8bcddeb89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.9
|
Release files / uio_api-0.1.1-py3-none-any.whl
| Download URL | uio_api-0.1.1-py3-none-any.whl |
|---|---|
| Size | 106.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04bb403b88cc3f1dffdb34967747848e03453ce1d2a02d99f7838e865a199128
|
|
BLAKE2b-256 checksum How to use checksums |
5ffe6b8c91115abcc32354dbb6e2baaa0de0a311a7bae263e0e85886fd609f3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.9
|
Security for uio-api 0.1.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.