--- id: k5test version: "0.10.4" license: unclear license_treatment: permissive maintenance: dormant --- # k5test — A library for testing Python applications in self-contained Kerberos 5 environments License: permissive · Maintenance: dormant · Downloads: 164.5K/mo ## What it is and what it does k5test is a testing library that automates the setup and teardown of isolated Kerberos 5 environments for Python unit tests. Instead of manually configuring Kerberos realms or relying on system-wide Kerberos configuration, developers inherit from KerberosTestCase and get a self-contained test realm automatically provisioned before each test and cleaned up afterwards. This isolation is valuable for testing Kerberos-dependent applications without affecting production or shared Kerberos infrastructure. The library also provides decorators to conditionally skip tests based on Kerberos version, GSSAPI extension availability, or installed plugins. It supports both MIT krb5 and Heimdal implementations and has been maintained since 2015, with support for Python 3.6 through 3.11. No runtime dependencies are required for basic use, though optional integration with python-gssapi enables extension-aware test skipping. Use it for: - Test Kerberos authentication flows in isolation without modifying system Kerberos configuration. - Run GSSAPI-dependent unit tests with automatic environment setup and teardown per test case. - Skip tests conditionally when krb5 version is below a required minimum or when specific GSSAPI extensions are unavailable. - Validate Kerberos realm configuration and credential handling in a sandboxed environment. - Test applications that depend on Kerberos plugins without requiring those plugins in the test environment. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. k5test sets up isolated Kerberos 5 test environments and provides test case classes and decorators to run Python unit tests within those environments without affecting system Kerberos configuration. Yes, if you are testing Kerberos or GSSAPI-dependent Python applications. The library eliminates manual Kerberos setup boilerplate and provides clean test isolation. However, note that maintenance is dormant (last release 877 days ago); if you need active support or compatibility with very recent Kerberos versions, evaluate whether the package still meets your requirements. For stable, long-term Kerberos testing needs, it remains a solid choice. ## Install pip install k5test uv add k5test poetry add k5test ## Installing k5test Before you install: Low install friction with no runtime dependencies. Maintenance is dormant—last release was 877 days ago, though the repository remains active with a recent commit on 2024-11-11. Suitable for projects with stable Kerberos testing needs but not for active feature development. License in practice: Dual-licensed under ISC and MIT, both permissive licenses. You can use, modify, and distribute the package freely with minimal restrictions. Quickstart: pip install k5test from k5test import KerberosTestCase class MyKerberosTest(KerberosTestCase): def test_kerberos_operation(self): # Kerberos 5 environment is automatically set up pass Requires MIT Kerberos 5 (krb5) or Heimdal to be installed on the system; k5test does not bundle Kerberos itself. Verify before relying: - Whether the dormant maintenance status (877 days since last release) affects compatibility with recent Kerberos versions or Python 3.10+. - Specific version requirements or known incompatibilities with particular krb5 or Heimdal releases. - Whether optional dependencies like python-gssapi are required for core functionality or only for decorator features. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 164.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags kerberos 5 testing, krb5 test environment, gssapi unit testing, kerberos realm setup, isolated kerberos testing, krb5 test harness, kerberos security testing, kerberos, gssapi, test-harness [View on SkillFed](https://skillfed.io/packages/k5test) · [View on PyPI](https://pypi.org/project/k5test/)