hedron-sim
Offline HTMX simulation for Hedron docs and demos.
Author demos with ordinary Hedron components (Page, RefreshButton, swap,
regions), then embed them in static docs. A small JavaScript runtime intercepts
hx-* attributes and serves pre-rendered fragment HTML — no FastAPI process
required.
Package maturity: Beta tooling-grade (0.2.x) · pin >=0.2.0,<0.3
Install
pip install "hedron-sim>=0.2.0,<0.3"
# or
uv add "hedron-sim>=0.2.0,<0.3"
Requires Python 3.11–3.14 and hedron (for component imports used in demos).
Quick start
from hedron import Page, RefreshButton, Stack, Text, html, swap
from hedron_sim import SimApp, embed_demo, sim_utc
app = SimApp(demo_id="hello-status")
status = app.region("service-status")
def status_panel():
return html.div(
Text(f"All systems operational · refreshed {sim_utc()}"),
id=status.id,
role="status",
aria={"live": "polite"},
)
@app.page("/")
def home() -> Page:
return Page(
Stack(
Text("Hello from hedron-sim"),
status_panel(),
RefreshButton.for_region(status, href="/status", label="Refresh status"),
),
title="Demo",
)
@app.fragment("/status", region=status) # SimApp package-native simulator route
def refresh_status():
return swap(status_panel())
print(embed_demo(app))
Ship static assets
from pathlib import Path
from hedron_sim.assets import copy_assets
copy_assets(Path("docs/javascript"), Path("docs/stylesheets"))
Then load hedron-sim.js (and optionally hedron-sim.css) from MkDocs
extra_javascript / extra_css.
Public API
| Symbol | Role |
|---|---|
SimApp |
Offline app with @page / @fragment and regions |
embed_demo(app) |
HTML snippet for static docs |
sim_utc / sim_local_time |
Deterministic clock helpers for demos |
hedron_sim.assets.copy_assets |
Copy JS/CSS into a docs tree |
Links
License
MIT. See the repository license.
Metadata
Release files for hedron-sim 0.2.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hedron_sim-0.2.7.tar.gz | 29.9 kB | Without provenance | Details for hedron_sim-0.2.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hedron_sim-0.2.7-py3-none-any.whl | Python 3 | none | any | Details for hedron_sim-0.2.7-py3-none-any.whl |
Total release size: 62.7 kB
Release files / hedron_sim-0.2.7.tar.gz
| Download URL | hedron_sim-0.2.7.tar.gz |
|---|---|
| Size | 29.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a24e4dbcefe60a81369fcae2c0d5dc6c20967de3b24e300cfb6e67cbf36b8e3
|
|
BLAKE2b-256 checksum How to use checksums |
60d3996ddb7eb022eca28b337c3aa207dc1557bedeb1c3901afe9b1a42b0ca26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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}
|
Release files / hedron_sim-0.2.7-py3-none-any.whl
| Download URL | hedron_sim-0.2.7-py3-none-any.whl |
|---|---|
| Size | 32.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
37953a6e1f4ba47854795ffa13afc55e073661b62988b134bbc5952bf66b723f
|
|
BLAKE2b-256 checksum How to use checksums |
b1f7acec92bd393cf3edd9f5846126212b5cbe4c4f328d55b5101c0a024f317b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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}
|
Security for hedron-sim 0.2.7
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.