Skip to main content

Trunco

Trunco is a Python framework for building dynamic, reusable HTML components. It integrates with Django, Flask, FastAPI, and other web frameworks, with optional DaisyUI and 0build (formerly Franken UI) kits.

Features

  • Component-based architecture — composable Python objects render to HTML
  • Optional integrations — Alpine.js, HTMX, UIKit helpers built in
  • UI kits — trunco.daisy and trunco.zbuild with unified short imports (Form, Button, Alert, …)
  • Custom themes — register your own color schemes like DaisyUI/Tailwind
  • Zero runtime dependencies — core install is dependency-free

Installation

uv pip install trunco

Quickstart

from trunco.daisy import Form, FormControl, Input, Button, Alert, Page

form = Form(action="/save")
form.add_child(FormControl(label="Email", field=Input(placeholder="you@example.com")))
form.add_child(Button(label="Save", color="primary"))
form.add_child(Alert(message="Ready", color="info"))

print(Page(form, theme_name="light").render())

Swap kits by changing one import:

import trunco.daisy as ui   # or: import trunco.zbuild as ui

Documentation

The docs site is built with Trunco and deployed to GitHub Pages.

uv pip install -e .
uv run python docs/serve.py   # preview at http://127.0.0.1:8000
uv run python docs/build.py   # build only → docs/_site/
Resource Location
Live docs GitHub Pages (after deploy)
Site source docs/src/
Build script docs/build.py
Legacy markdown docs/archive/

Examples

Runnable examples in examples/:

uv run python examples/01_core_basics.py
uv run python examples/04_daisy_kit.py
uv run python examples/07_kit_swap.py

Development

uv sync
uv pip install -e .
uv run pytest
uv run python docs/build.py

License

MIT — see LICENSE.

Metadata

Release files for trunco 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for trunco 1.0.0
File Size Uploaded Provenance
trunco-1.0.0.tar.gz 28.9 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for trunco 1.0.0
File Interpreter ABI Platform
trunco-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 78.2 kB

Release files / trunco-1.0.0.tar.gz

Download URL trunco-1.0.0.tar.gz
Size 28.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f90fc9b7dc4630047abfc7df9c2d76ab2020153e1dc2ab466d3f3213262a5fb2
BLAKE2b-256 checksum
How to use checksums
243cd7fe376742c2138e3160481c4fc4adf73006c9dfe3c868d00cdc5121dbb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 16, 2026.

Transparency log

Release files / trunco-1.0.0-py3-none-any.whl

Download URL trunco-1.0.0-py3-none-any.whl
Size 49.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9fda4a1e23ad3fe1af964a76ac2278e235874f94b666d8beba9a05bd6a2e1c39
BLAKE2b-256 checksum
How to use checksums
58a56482d753e6cd1bd5aea6fc03ed505c6bface99368d63cae6d0a555549d64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 16, 2026.

Transparency log

Security for trunco 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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for trunco-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 Jun 16, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page