mreg-api is a Python client library for the MREG
REST API. It gives you a typed, ergonomic interface to every MREG
resource through a single client
object with scoped namespaces for each resource type.
It provides optional caching of resources, automatic FQDN expansion of hostnames, and a consistent interface for all resource types. The client is compatible with Python 3.11 and later.
https://unioslo.github.io/mreg-api/
Set up a development environment with uv:
git clone git@github.com:unioslo/mreg-api.git
uv syncThis project uses prek to manage pre-commit hooks for code quality and formatting. To set up the pre-commit hooks, run the following command:
uv tool install prekThen, install the pre-commit hooks with:
prek installRun the pre-commit checks manually with:
prek run
# Optionally for all files:
prek run --all-files