Skip to main content

A fast and realistic Mustache-based HTML generator

Project description

Fstache

Overview

Benchmarks

Renderer Throughput

Library Renders per second Indentation details
Fstache 4066.5 Deviates: ignore_indents=True skips standard standalone partial reindentation.
Fstache 3102.2 Follows standard standalone partial indentation.
mstache 1339.0 Deviates: keep_lines=True keeps tag-only lines instead of collapsing them, so partial indentation is not reapplied to every partial line.
mstache 985.3 Follows standard standalone partial indentation.
Chevron 951.1 Follows standard standalone partial indentation.
Pystache 898.8 Follows standard standalone partial indentation.

Benchmark environment

Field Value
Python CPython 3.14.6
OS Fedora Linux 44 (Workstation Edition), Linux 7.0.12-201.fc44.x86_64
CPU AMD Ryzen 7 8845HS w/ Radeon 780M Graphics, 8 cores / 16 threads
Compared versions Fstache 0.1.0, Chevron 0.14.0, mstache 0.3.0, Pystache 0.6.8
Command RENDERER=<renderer> uv run --python 3.14 --extra dev python tests/perf_test.py
<renderer> values: fstache.no_indentation, fstache, mstache.no_indentation, mstache, chevron, pystache

Methodology

  • The benchmark renders a realistic, heavy marketing/docs HTML page from the source Mustache templates, JSON data, and perf script:
    • About 100 KiB of rendered HTML (source) from 15 Mustache templates, including 14 partial files.
    • Tailwind CSS v4 utility-heavy markup with Alpine.js attributes, inline SVG icons, responsive navigation, cards, tables, accordions, and form controls.
    • About 15 KiB of JSON context data with nested arrays for navigation, feature cards, testimonials, a recursive docs tree, comparison rows, blog posts, changelog entries, FAQs, and pricing plans.
    • 42 section, inverted-section, and partial references, including 24 section tags for loops and conditionals plus recursive node partial rendering.
  • The benchmark isolates render throughput from setup work:
    • Each engine preloads the template files and partials during setup.
    • Each engine uses the closest available precompiled, preparsed, or pretokenized representation for the layout and partials.
    • The timed render loop excludes disk I/O and one-time template preparation.

Utility Commands

Generate Reference HTML

Builds and renders the templates from ./demo into ./demo/dist/index.html (performing file I/O):

make build-html

Format and Lint

Runs ruff checks and auto-formats the project:

make post-ai-change

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fstache-0.1.0.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fstache-0.1.0-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file fstache-0.1.0.tar.gz.

File metadata

  • Download URL: fstache-0.1.0.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fstache-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0e5eed9126201b957225cbb2ad97d800848b07b3ef8c0df23779041c8936a770
MD5 ef086288c02cb0229030fb2396ca727f
BLAKE2b-256 3151d313fcc95b24b47688f7c6e5ac5fd547b7ea8488e605b35d3d57511d6b99

See more details on using hashes here.

File details

Details for the file fstache-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fstache-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fstache-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ee92a726eeb9fc213e1268eac0d76358a375cafc541fb81401c9b27e5a9d6ba
MD5 803b0e468ae0186ad7b5acdcb8522f61
BLAKE2b-256 59c089d46571e5a8bc8ca717348aa83dc6b67dbc770413fb36e65eb4523fecea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page