python-kadmin-rs
Python interface to the Kerberos administration interface (kadm5)
What it is and what it does
python-kadmin-rs wraps a Rust library that provides safe bindings to libkadm5, the Kerberos administration library. It lets you manage Kerberos realms—create, modify, and list principals—either remotely (via password authentication) or locally (on the KDC itself). The package supports both MIT Kerberos and Heimdal variants and loads the library at runtime rather than linking statically, so it can adapt to whichever Kerberos implementation is installed.
The Python API sits atop a thread-safe Rust interface, so you can use it in multithreaded applications without manually managing synchronization. It's early-stage (Alpha) but actively maintained, with wheels built for modern Python versions (3.11–3.15) on macOS and Linux. You'll need the underlying Kerberos library installed on your system for it to work.
Use it for:
- Automate user provisioning by creating and managing Kerberos principals from Python scripts or applications.
- Query and list principals in a Kerberos realm for auditing or inventory purposes.
- Integrate Kerberos administration into a larger identity management or authentication system.
- Run administrative tasks locally on a KDC without needing separate kadmin command-line tools.
- Build a web service or API that exposes Kerberos realm management to other systems.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python bindings for Kerberos administration (kadm5), enabling remote and local management of Kerberos realms through MIT Kerberos or Heimdal.
Yes, if you need to administer Kerberos realms from Python and can tolerate Alpha-stage software. The package is actively maintained, has no known vulnerabilities, supports current Python versions, and offers a clean API for both remote and local operations. Install friction is moderate due to compiled wheels and the system Kerberos dependency, but that is unavoidable for this use case. Not suitable if you require production-grade stability guarantees.
Install
python-kadmin-rs on PyPI
pip
pip install python-kadmin-rsuv
uv add python-kadmin-rspoetry
poetry add python-kadmin-rsInstalling python-kadmin-rs
Before you install
Medium install friction due to compiled wheels; requires Python 3.11–3.15 and a compatible Kerberos library (MIT or Heimdal) at runtime. Actively maintained with recent releases, but early-stage (Alpha status).
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
import kadmin
# Remote operation
kadm = kadmin.KAdmin.with_password(
kadmin.KAdm5Variant.MitClient,
"user/admin@EXAMPLE.ORG",
"password"
)
print(kadm.list_principals("*"))
# Local operation
kadm_local = kadmin.KAdmin.with_local(kadmin.KAdm5Variant.MitClient)
print(kadm_local.list_principals("*"))
Requires libkadm5 (MIT Kerberos or Heimdal) installed and discoverable at runtime; not thread-safe without using the sync interface.
Verify before relying
- Whether the sync interface used by Python bindings fully resolves thread-safety concerns for production workloads.
- Performance characteristics and scalability limits for bulk principal operations.
- Compatibility matrix between specific MIT Kerberos and Heimdal versions.
- Whether local operations require administrative privileges or keytab access.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<3.16,>=3.11) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 3 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 182,290/month — #10,105 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: python_kadmin_rs-0.7.4-cp311-cp311-macosx_14_0_arm64.whl; python_kadmin_rs-0.7.4-cp311-cp311-macosx_14_0_x86_64.whl; python_kadmin_rs-0.7.4-cp311-cp311-manylinux_2_28_aarch64.whl; python_kadmin_rs-0.7.4-cp311-cp311-manylinux_2_28_x86_64.whl; python_kadmin_rs-0.7.4-cp312-cp312-macosx_14_0_arm64.whl; python_kadmin_rs-0.7.4-cp312-cp312-macosx_14_0_x86_64.whl; python_kadmin_rs-0.7.4-cp312-cp312-manylinux_2_28_aarch64.whl; python_kadmin_rs-0.7.4-cp312-cp312-manylinux_2_28_x86_64.whl; python_kadmin_rs-0.7.4-cp313-cp313-macosx_14_0_arm64.whl; python_kadmin_rs-0.7.4-cp313-cp313-macosx_14_0_x86_64.whl; python_kadmin_rs-0.7.4-cp313-cp313-manylinux_2_28_aarch64.whl; python_kadmin_rs-0.7.4-cp313-cp313-manylinux_2_28_x86_64.whl; python_kadmin_rs-0.7.4-cp314-cp314-macosx_14_0_arm64.whl; python_kadmin_rs-0.7.4-cp314-cp314-macosx_14_0_x86_64.whl; python_kadmin_rs-0.7.4-cp314-cp314-manylinux_2_28_aarch64.whl; python_kadmin_rs-0.7.4-cp314-cp314-manylinux_2_28_x86_64.whl; python_kadmin_rs-0.7.4-cp314-cp314t-macosx_14_0_arm64.whl; python_kadmin_rs-0.7.4-cp314-cp314t-macosx_14_0_x86_64.whl; python_kadmin_rs-0.7.4-cp314-cp314t-manylinux_2_28_aarch64.whl; python_kadmin_rs-0.7.4-cp314-cp314t-manylinux_2_28_x86_64.whl
Keywords: krb5, kadmin, kadm5, kerberos
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
krb5Wraps the Kerberos 5 C API to provide Python…
permissive · top 5,000 on PyPI
k5testk5test sets up isolated Kerberos 5 test…
permissive · top 15,000 on PyPI
pykerberosProvides a Python wrapper for Kerberos (GSSAPI)…
permissive · top 5,000 on PyPI
requests-kerberosAdds Kerberos/GSSAPI authentication support to…
permissive · top 5,000 on PyPI
kerberosProvides a high-level Python wrapper for…
permissive · top 5,000 on PyPI
winkerberosProvides native Kerberos client authentication…
permissive · top 5,000 on PyPI
minikerberosA pure-Python Kerberos client library…
permissive · top 15,000 on PyPI
requests-credsspAdds CredSSP authentication support to the…
permissive · top 15,000 on PyPI
requests-gssapiAdds GSSAPI/Kerberos authentication support to…
permissive · top 15,000 on PyPI
gssapiPython-GSSAPI wraps the GSSAPI C libraries to…
permissive · top 5,000 on PyPI