--- id: cosl version: "1.10.3" license: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) license_treatment: permissive maintenance: active --- # cosl — Utils for COS Lite charms License: permissive · Maintenance: active · Downloads: 221.2K/mo ## What it is and what it does cosl is a utility library for COS Lite charms—Juju charm applications that integrate with the Canonical Observability Stack. It provides three main components: CosTool (bindings to the cos-tool CLI), JujuTopology (logic for generating topology labels used in observability metrics), and LokiHandler (a Python logging handler that sends logs to a Loki push API endpoint). The library depends on ops, diskcache, pydantic, pyyaml, tenacity, and typing-extensions, making it suitable for charm developers who need to instrument their applications with observability without building these integrations from scratch. The package is actively maintained and has no known vulnerabilities. It targets charm developers and system administrators building observable Juju applications. The coordinated_workers module was moved to a separate package, so if you need that functionality, you should use the coordinated-workers package instead. Use it for: - Add structured logging to a Juju charm that forwards logs to a Loki instance for centralized log aggregation - Generate and apply Juju topology labels to charm metrics for model-driven observability - Integrate cos-tool functionality into charm code for COS Lite bundle operations - Build observability into custom charms deployed on Juju models with COS Lite ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides utilities for COS Lite charms, including bindings for cos-tool, Juju topology logic for observability labels, and a Python logging handler that forwards logs to Loki. Yes, if you are developing Juju charms for COS Lite. The library is actively maintained, has low install friction, carries no security vulnerabilities, and provides essential observability utilities that would otherwise require custom implementation. Not relevant for non-charm Python projects. ## Install pip install cosl uv add cosl poetry add cosl ## Installing cosl Before you install: Low install friction with a pure-wheel distribution. Actively maintained with a recent release (2026-08-14), no known vulnerabilities, and straightforward dependencies. License in practice: Apache License 2.0 is permissive and allows commercial use, modification, and distribution with minimal restrictions—suitable for most projects. Quickstart: pip install cosl from cosl.cos_tool import CosTool from cosl.juju_topology import JujuTopology from cosl.loki_logger import LokiHandler # Use CosTool, JujuTopology, or LokiHandler as needed for your charm Verify before relying: - Whether CosTool requires the external cos-tool binary to be installed on the system - Specific Loki API endpoint requirements and authentication details for LokiHandler - Whether JujuTopology requires a running Juju model or works offline ## Package facts - License: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 221.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags juju charm observability utilities, loki logging handler python, cos-tool bindings, juju topology metrics, charm logging integration, juju-charm, observability, logging [View on SkillFed](https://skillfed.io/packages/cosl) · [View on PyPI](https://pypi.org/project/cosl/)