charmarr-lib-core
Core charm libraries for Charmarr media automation.
Features
- Juju relation interfaces for media automation
- API clients for *arr applications (Radarr, Sonarr, Prowlarr, etc.)
- Reconcilers for managing application configuration
- Pydantic models for type-safe data validation
- K8s storage utilities for StatefulSet patching
Installation
pip install charmarr-lib-core
Usage
Interfaces
from charmarr_lib.core.interfaces import (
# Media Indexer (Prowlarr <-> Radarr/Sonarr/Lidarr)
MediaIndexerProvider,
MediaIndexerRequirer,
MediaIndexerProviderData,
MediaIndexerRequirerData,
# Download Client (qBittorrent/SABnzbd <-> Radarr/Sonarr/Lidarr)
DownloadClientProvider,
DownloadClientRequirer,
DownloadClientProviderData,
DownloadClientRequirerData,
# Media Storage (shared PVC <-> all apps)
MediaStorageProvider,
MediaStorageRequirer,
MediaStorageProviderData,
MediaStorageRequirerData,
# Media Manager (Radarr/Sonarr <-> Overseerr/Jellyseerr)
MediaManagerProvider,
MediaManagerRequirer,
MediaManagerProviderData,
MediaManagerRequirerData,
QualityProfile,
)
API Clients
from charmarr_lib.core import (
# Radarr/Sonarr/Lidarr client (v3 API)
ArrApiClient,
# Prowlarr client (v1 API)
ProwlarrApiClient,
# Errors
ArrApiError,
ArrApiConnectionError,
ArrApiResponseError,
)
# Connect to Radarr
with ArrApiClient("http://radarr:7878", api_key) as client:
profiles = client.get_quality_profiles()
client.add_root_folder("/movies")
Reconcilers
from charmarr_lib.core import (
reconcile_download_clients,
reconcile_media_manager_connections,
reconcile_root_folder,
reconcile_external_url,
)
# Sync download clients from relations to Radarr
reconcile_download_clients(
api_client=arr_client,
desired_clients=download_client_data_from_relations,
category="radarr",
media_manager=MediaManager.RADARR,
get_secret=lambda sid: model.get_secret(id=sid).get_content(),
)
Storage Utilities
from charmarr_lib.core import (
reconcile_storage_volume,
is_storage_mounted,
K8sResourceManager,
ReconcileResult,
)
manager = K8sResourceManager()
result = reconcile_storage_volume(
manager=manager,
statefulset_name="radarr",
container_name="radarr", # from charmcraft.yaml
namespace="media",
pvc_name="media-storage",
mount_path="/data",
)
Metadata
Release files for charmarr-lib-core 1.0.0
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 |
|---|---|---|---|---|
| charmarr_lib_core-1.0.0.tar.gz | 51.3 kB | With provenance | Details for charmarr_lib_core-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| charmarr_lib_core-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for charmarr_lib_core-1.0.0-py3-none-any.whl |
Total release size: 100.7 kB
Release files / charmarr_lib_core-1.0.0.tar.gz
| Download URL | charmarr_lib_core-1.0.0.tar.gz |
|---|---|
| Size | 51.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a7c2303a9279a3ad9c0ac8bcf1c2fc7d947ed0910212b67ab38da0ebe02e053f
|
|
BLAKE2b-256 checksum How to use checksums |
6f44e3905eef5b054d245c30fd9ff74a90e15e12d4f29c174fce41ced98f0054
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 24, 2026.
Transparency logRelease files / charmarr_lib_core-1.0.0-py3-none-any.whl
| Download URL | charmarr_lib_core-1.0.0-py3-none-any.whl |
|---|---|
| Size | 49.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
93326dd8c3631e0efa0b673c5ead32dc94c4143577876889a357ff80ed414afe
|
|
BLAKE2b-256 checksum How to use checksums |
64fa0b7b1bfa981b350deda1caf8244ed8d534ea9c9ba37a90f1cf945c0f6a48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 24, 2026.
Transparency logSecurity for charmarr-lib-core 1.0.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for charmarr_lib_core-1.0.0.tar.gz
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 Sep 24, 2026.
Transparency logA 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.