charmarr-lib-krm
Kubernetes Resource Manager with retry logic and reconciliation utilities.
Features
- Generic CRUD operations for any K8s resource type via lightkube
- Automatic retry on transient errors (409 Conflict, 429 Rate Limit, 5xx)
- Strategic merge patch and server-side apply support
- Reconciliation result types for idempotent operations
Installation
pip install charmarr-lib-krm
Usage
from charmarr_lib.krm import K8sResourceManager, ReconcileResult
from lightkube.resources.apps_v1 import StatefulSet
# Create manager (uses in-cluster config or kubeconfig)
manager = K8sResourceManager()
# Get a resource
sts = manager.get(StatefulSet, "my-app", "my-namespace")
# Patch with automatic retry on conflict
manager.patch(StatefulSet, "my-app", patch_data, "my-namespace")
# Server-side apply for idempotent create/update
manager.apply(resource)
# Check existence
if manager.exists(StatefulSet, "my-app", "my-namespace"):
...
# Delete with 404 handling
deleted = manager.delete(StatefulSet, "my-app", "my-namespace")
License
LGPL-3.0-or-later
Metadata
Release files for charmarr-lib-krm 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| charmarr_lib_krm-0.1.2.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| charmarr_lib_krm-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.9 kB
Release files / charmarr_lib_krm-0.1.2.tar.gz
| Download URL | charmarr_lib_krm-0.1.2.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3c89e665b576ef676240d29f1f4ac7d29f6ed2ee6a9d5fc720028c1776d0fd0
|
|
BLAKE2b-256 checksum How to use checksums |
53c2a0cd475fa0d3a81836801825e5d2767f6cefc9238e2007ab39107731516a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 15, 2026.
Transparency logRelease files / charmarr_lib_krm-0.1.2-py3-none-any.whl
| Download URL | charmarr_lib_krm-0.1.2-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dcfd192777d4def6c3e8f482dbc19c6cf30ec47d78ac5c0e5b13a99d75eb5c73
|
|
BLAKE2b-256 checksum How to use checksums |
2fc2139907b494f3998940ae88465852e13475065d2cc090f7f212e4b176d3d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 15, 2026.
Transparency log