A Python client for Umami, the privacy-preserving, open source alternative to Google Analytics. umami-analytics lets you record custom events, page views, and revenue directly from your application code — the interactions you can’t capture with Umami’s HTML tracking attributes alone. Built on httpx and pydantic, it offers both synchronous and async APIs, per-user identification via distinct_id, website and real-time active-visitor stats, and a tracking-disable switch for local development. Works with self-hosted and Umami Cloud instances. Install via pip install umami-analytics (Python 3.10+).
A Python client for Listmonk, the open source, self-hosted newsletter and mailing-list manager. listmonk lets you manage subscribers, lists, campaigns, and templates — and send transactional email (password resets and the like) — directly from your application code against a Listmonk instance. Built on httpx and pydantic, it covers the slice of Listmonk’s extensive API that web apps reach for most: subscribe and unsubscribe, segment users into lists, search subscribers by custom attributes, run health checks, and manage campaigns and email templates. The API is synchronous today (async is planned). Install via pip install listmonk (Python 3.10+).
A small, dependency-light library that maps filenames and file extensions to their MIME (content) types — without ever reading the file’s bytes. That makes it ideal when the file isn’t local to inspect, such as objects in S3 or remote URLs you only know by name. content-types ships 360+ mappings spanning images, audio, video, archives, documents, data-science formats, source code, and config files, all reachable through a single get_content_type() call. It also offers convenient shortcut constants (e.g. content_types.webp, content_types.parquet), Path and URL support, a CLI for quick terminal lookups, and a safe application/octet-stream fallback for anything unknown. Install via pip install content-types (Python 3.10+).
A small, pure-Python library that brings reusable partial HTML templates to the Chameleon template language for Python web frameworks. Just as you factor code into reusable functions, chameleon-partials lets you extract repeated HTML fragments — a video thumbnail, an author byline, a card — into standalone partial templates and render them anywhere, passing model data in as keyword arguments, with nested partials fully supported. You register it once at app startup with register_extensions(), then call render_partial() from inside your templates. Its only dependency is Chameleon itself, and it ships with a sample Pyramid application; a Jinja2/Flask counterpart lives in jinja-partials. Install via pip install chameleon-partials (Python 3.6+).
Integrates the Chameleon template language into FastAPI, so a view can return server-rendered HTML as cleanly as FastAPI returns JSON. A single @template() decorator turns a view into a rendered page — return a dict and it becomes the template’s model, or return a fastapi.Response (a redirect, JSON, and so on) to skip rendering entirely. Sync and async views are both fully supported, template names are inferred from the module and function when omitted, and not_found() / generic_error() render friendly error pages. The decorator preserves the view’s signature via ParamSpec overloads, so FastAPI’s dependency injection and type checkers keep working. You set it up once with global_init(), and its only dependencies are FastAPI and Chameleon. Install via pip install fastapi-chameleon (Python 3.10+).
Brings reusable partial HTML templates to the Jinja template language — the Jinja counterpart to Chameleon Partials. jinja-partials lets you extract repeated HTML fragments — a video thumbnail, an author byline, a card — into standalone partial templates and render them with render_partial(), passing model data in as keyword arguments, with nested partials fully supported. It ships first-class support for the popular Python web frameworks: Flask (register_extensions), FastAPI (register_fastapi_extensions), Starlette (register_starlette_extensions), Quart (register_quart_extensions), or any bare Jinja2 environment (register_environment) — plus a declarative PartialsJinjaExtension you can add to an existing Jinja env. Its only dependency is Jinja2 itself. Install via pip install jinja-partials (Python 3.10+).
Integrates the Chameleon template language into Flask and Quart — the Flask/Quart counterpart to FastAPI Chameleon. A @template() decorator turns a view into a rendered page: return a dict and it becomes the template’s model, or return a flask.Response (a redirect, error, and so on) to skip rendering entirely. It works on both sync and async views, lets you set the content_type and default status_code right on the decorator, and provides not_found() for friendly 404 pages. A restricted_namespace=False option relaxes Chameleon’s namespace checks so attribute-based JavaScript frameworks like Alpine.js and Vue (@click, :class, x-data) pass through untouched. You set it up once with global_init(), and its dependencies are Chameleon and Flask. Install via pip install chameleon-flask (Python 3.10+).
Adds explicit switch blocks to the Python language — without changing the language itself — by building on the standard with statement. Inside a with switch(value) as s: block, you map cases to actions with s.case(...) and s.default(...); keys can be anything hashable, and lists or ranges can map multiple cases to a single action (with closed_range() covering the inclusive end). Compared to the dict-of-functions idiom, switchlang verifies method signatures, checks for duplicate cases, guarantees a default, and supports opt-in fall-through via fallthrough=True, with the chosen action’s return value available as s.result. It has no third-party dependencies. Install via pip install switchlang (Python 3.9+).
Integrates the Chameleon template language into Robyn, the Rust-powered async Python web framework — the Robyn counterpart to FastAPI Chameleon and Chameleon Flask. A @template() decorator turns a handler into a rendered page: return a dict and it becomes the template’s model, or return a Robyn Response (a redirect, custom error, and so on) and it passes through untouched. Template names are inferred from the module and function when omitted, sync and async handlers both work, status_code and content_type can be set right on the decorator, and not_found() renders friendly 404 pages. You set it up once with global_init() (with optional template auto-reload for development), and its dependencies are Chameleon and Robyn. It’s early-stage alpha, so expect the API to evolve. Install via pip install chameleon-robyn (Python 3.10+).