Chameleon Partials v0.2.0
  • API Reference
  • Changelog

Skills

A skill is a package of structured files that teaches an AI coding agent how to work with a specific tool or framework. The skill below was generated by Great Docs from this project’s documentation. Install it in your agent and it will be able to run commands, edit configuration, write content, and troubleshoot problems without step-by-step guidance from you.

Any agent — install with npx:

npx skills add https://mkennedy.codes/docs/chameleon-partials/

Codex / OpenCode

Tell the agent:
Fetch the skill file at https://mkennedy.codes/docs/chameleon-partials/skill.md and follow the instructions.

Manual — download the skill file:

curl -O https://mkennedy.codes/docs/chameleon-partials/skill.md

Or browse the SKILL.md file.

SKILL.md

---
name: chameleon-partials
description: >
  Simple reuse of partial HTML page templates in the Chameleon template language for Python web frameworks. Use when writing Python code that uses the chameleon_partials package.
license: MIT
compatibility: Requires Python >=3.9.
---

# Chameleon Partials

Simple reuse of partial HTML page templates in the Chameleon template language for Python web frameworks.

## Installation

```bash
pip install chameleon-partials
```

## API overview

### Setup

Register chameleon_partials with Chameleon. Call this once at application startup.

- `register_extensions`: Register chameleon_partials with Chameleon so partials can be rendered

### Rendering partials

Render partial templates and expose render_partial to your view models.

- `render_partial`: Render a partial template to an HTML fragment
- `extend_model`: Add `render_partial` to a view model so templates can call it

### Exceptions

Errors raised by the library.

- `PartialsException`: Raised when chameleon_partials is configured or used incorrectly

## Resources

- [Full documentation](https://mkennedy.codes/docs/chameleon-partials/)
- [llms.txt](llms.txt) — Indexed API reference for LLMs
- [llms-full.txt](llms-full.txt) — Comprehensive documentation for LLMs
- [Source code](https://github.com/mikeckennedy/chameleon_partials)

Developed by Michael Kennedy.
Site created with Great Docs.