Skip to main content

📘 Stencil

PyPI version License: MIT Python Versions

Quick throwaway UIs for developers testing logic or wrapping scripts.

Write YAML → get a working UI in seconds. Terminal, desktop, or browser. No frontend knowledge required.


Why Stencil?

You need a UI to test backend logic or wrap a script — not a production app, just something functional. Skip the boilerplate. Describe your UI once, generate it instantly.

Backends:

  • HTML — browser-based, shareable
  • curses — terminal UI, SSH-friendly
  • imgui — desktop GUI, immediate mode

Installation

pip install stencil-ui  # Python 3.12+

Usage

stencil init              # create stencil.yaml
stencil                   # generate HTML (default)
stencil -b curses         # terminal UI
stencil -b imgui          # desktop GUI
stencil --watch           # auto-regenerate on changes

Example Config

config:
  backend: "html"

app:
  - title: "Task Manager"
  - input:
      label: "Task"
      placeholder: "Buy groceries..."
  - button:
      label: "Add"
      callback: "addTask"
  - separator
  - text: "© 2025"

Components: title, text, input, button, separator


Extending

Add backends by dropping a folder in stencil/backends/<name>/:

mybackend/
  backend.yaml      # metadata
  _layout.j2        # wrapper template
  Button.j2         # component templates
  Input.j2
  Text.j2

No Python changes needed. Engine auto-discovers backends. See CONTRIBUTING.md for details.


License

MIT — use it however you want.

Contributing? Open an issue or PR. Easiest contribution: add a new backend for your favorite framework.

Metadata

Release files for stencil-ui 2.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 stencil-ui 2.0.0
File Size Uploaded Provenance Actions
stencil_ui-2.0.0.tar.gz 9.5 kB Without provenance Details for stencil_ui-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stencil-ui 2.0.0
File Interpreter ABI Platform Actions
stencil_ui-2.0.0-py3-none-any.whl Python 3 none any Details for stencil_ui-2.0.0-py3-none-any.whl

Total release size: 20.0 kB

Release files / stencil_ui-2.0.0.tar.gz

Download URL stencil_ui-2.0.0.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
20457d6746e818fb153198d9989a809e2e6987bc0b6a7e618381b9a7d9f766cd
BLAKE2b-256 checksum
How to use checksums
8d5b05bacfae3063f136366fc9944cfa1bc9ccf3d6dc75c3a0edd8bed06f65c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.2

Release files / stencil_ui-2.0.0-py3-none-any.whl

Download URL stencil_ui-2.0.0-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8a2f90e97d38639a6c1aa9fff41f198a1fb62edee9ea32a10c8b9ac94ed26e3
BLAKE2b-256 checksum
How to use checksums
8700a0f5816f4d3a2cf513650610d9a9d1f38cb90fdcd50cbb52968197fcadbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.2

Security for stencil-ui 2.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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