cosl
Utils for COS Lite charms
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
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 · maintenance · safety
permissive license (permissive) — Apache License 2.0 is permissive and allows commercial use, modification, and distribution with minimal restrictions—suitable for most projects.
last release 2026-08-14 (0 days) · last repo commit 2026-08-14
0 known vulnerabilities (OSV.dev, 2026-08-14) · 221,240 downloads/mo, #9,282 on PyPI
Alternatives
Verify before relying
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- 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
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 on this page. Verify before relying on it.
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
cosl on PyPI
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 | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesopsdiskcachepydanticpyyamltenacitytyping-extensions |
| Maintenance | Actively maintained 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 221,240 / month, #9,282 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.8Topic :: UtilitiesTyping :: Typed |
Evidence: cosl-1.10.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “juju charm observability utilities”
- coslProvides utilities for COS Lite charms, including bindings for…
- opsA Python framework for developing charms—declarative, event-driven…
- ops-scenarioops-scenario is a state-transition testing framework for Ops charms…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also ops · charmcraftlocal · charmlibs-pathops · ops-scenario · pytest-operator · jubilant · juju · python-logging-loki · loki-logger-handler · data-platform-helpers