Metadata-Version: 2.4
Name: hedron
Version: 0.25.1
Summary: FastAPI-native typed component framework for HTML and HTMX
Project-URL: Homepage, https://github.com/eddiethedean/hedron
Project-URL: Repository, https://github.com/eddiethedean/hedron
Project-URL: Issues, https://github.com/eddiethedean/hedron/issues
Project-URL: Changelog, https://github.com/eddiethedean/hedron/blob/main/packages/hedron/CHANGELOG.md
Project-URL: Documentation, https://hedron.readthedocs.io/en/latest/
Author-email: Odos Matthews <odosmatthews@gmail.com>
Maintainer-email: Odos Matthews <odosmatthews@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: components,fastapi,html,htmx,server-rendered,typed
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: <3.15,>=3.11
Requires-Dist: fastapi<0.150,>=0.141.1
Requires-Dist: hedron-core<0.26,>=0.25.0
Requires-Dist: itsdangerous>=2.2
Requires-Dist: packaging>=24.0
Requires-Dist: pydantic<2.15,>=2.13.4
Requires-Dist: python-multipart>=0.0.9
Provides-Extra: auth
Requires-Dist: authlib>=1.3; extra == 'auth'
Requires-Dist: httpx>=0.28; extra == 'auth'
Provides-Extra: browser
Requires-Dist: axe-playwright-python>=0.1.4; extra == 'browser'
Requires-Dist: playwright>=1.40; extra == 'browser'
Provides-Extra: charts
Requires-Dist: hedron-charts<0.2,>=0.1.6; extra == 'charts'
Provides-Extra: code
Requires-Dist: pygments>=2.17; extra == 'code'
Provides-Extra: conformance
Requires-Dist: hedron-conformance<0.26,>=0.25.0; extra == 'conformance'
Provides-Extra: data
Requires-Dist: hedron-data<0.26,>=0.25.0; extra == 'data'
Provides-Extra: dev
Requires-Dist: hedron-explorer<0.26,>=0.25.0; extra == 'dev'
Provides-Extra: email
Requires-Dist: email-validator>=2.0; extra == 'email'
Provides-Extra: experimental-ui
Requires-Dist: hedron-extras[experimental-ui]<0.26,>=0.25.0; extra == 'experimental-ui'
Provides-Extra: extras
Requires-Dist: hedron-extras<0.26,>=0.25.0; extra == 'extras'
Provides-Extra: gradio
Requires-Dist: hedron-gradio<0.2,>=0.1.0; extra == 'gradio'
Provides-Extra: images
Requires-Dist: pillow>=10.0; extra == 'images'
Provides-Extra: jinja
Requires-Dist: hedron-jinja<0.26,>=0.25.0; extra == 'jinja'
Provides-Extra: markdown
Requires-Dist: markdown>=3.5; extra == 'markdown'
Requires-Dist: nh3>=0.2; extra == 'markdown'
Provides-Extra: mcp
Requires-Dist: hedron-mcp<0.2,>=0.1.0; extra == 'mcp'
Provides-Extra: native
Requires-Dist: hedron-native<0.2,>=0.1.0; extra == 'native'
Provides-Extra: notebook
Requires-Dist: hedron-notebook<0.2,>=0.1.0; extra == 'notebook'
Provides-Extra: otel
Requires-Dist: opentelemetry-api<2,>=1.27; extra == 'otel'
Provides-Extra: sanitize
Requires-Dist: nh3>=0.2; extra == 'sanitize'
Description-Content-Type: text/markdown

# hedron

[![PyPI](https://img.shields.io/pypi/v/hedron.svg)](https://pypi.org/project/hedron/)
[![Python](https://img.shields.io/pypi/pyversions/hedron.svg)](https://pypi.org/project/hedron/)
[![CI](https://img.shields.io/github/actions/workflow/status/eddiethedean/hedron/ci.yml?branch=main&label=CI)](https://github.com/eddiethedean/hedron/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/eddiethedean/hedron/blob/main/LICENSE)

FastAPI-native typed component framework for HTML and HTMX — dashboards, admin tools,
and CRUD without a Node.js frontend stack.

**Package maturity:** Beta · **Train:** `0.25.0` (Published) · pin `>=0.25.0,<0.26`

## Install

```bash
pip install "hedron>=0.25.0,<0.26"
# or
uv add "hedron>=0.25.0,<0.26"
```

Requires Python 3.11–3.14.

### Optional extras

| Extra | Installs |
|---|---|
| `data` | [`hedron-data`](https://pypi.org/project/hedron-data/) (DataTable / DataEditor) |
| `jinja` | [`hedron-jinja`](https://pypi.org/project/hedron-jinja/) (`.hdj` templates) |
| `dev` | [`hedron-explorer`](https://pypi.org/project/hedron-explorer/) (Component Explorer) |
| `extras` | [`hedron-extras`](https://pypi.org/project/hedron-extras/) (workbenches) |
| `conformance` | [`hedron-conformance`](https://pypi.org/project/hedron-conformance/) |
| `charts` | `hedron-charts` (**currently incompatible on PyPI with Hedron 0.25; do not install**) |
| `native` | [`hedron-native`](https://pypi.org/project/hedron-native/) (**Alpha**) |
| `notebook` / `mcp` / `gradio` | Experimental Alpha packages |
| `markdown` / `code` / `images` / `email` / `sanitize` | Content helpers |
| `auth` | Authlib OIDC helpers |
| `browser` | Playwright + axe helpers |
| `otel` | OpenTelemetry hooks |

```bash
pip install "hedron[data,dev]>=0.25.0,<0.26"
```

Charts require the fixed satellite floor:
`pip install "hedron[charts]>=0.25.1,<0.26"`. See
[Compatibility](https://hedron.readthedocs.io/en/latest/COMPATIBILITY/#charts-and-sample-kit-compatibility-floor).

## Quick start

Scaffold an app with a working HTMX **Refresh status** control:

```bash
# Need uv? https://docs.astral.sh/uv/getting-started/installation/
uvx --from "hedron>=0.25.0,<0.26" hedron new my-hedron-app
cd my-hedron-app && uv sync && uv run uvicorn app:app --reload
```

Open [http://127.0.0.1:8000](http://127.0.0.1:8000) — click **Refresh status**; the
timestamp updates via an HTMX fragment swap.

Full walkthrough:
[Build your first app](https://hedron.readthedocs.io/en/latest/getting-started/quickstart/).

Built on [`hedron-core`](https://pypi.org/project/hedron-core/). Flask/Django:
[`hedron-flask`](https://pypi.org/project/hedron-flask/) /
[`hedron-django`](https://pypi.org/project/hedron-django/). Capability readiness:
[What’s ready](https://hedron.readthedocs.io/en/latest/guides/whats-ready/). Auth
(OIDC helpers): [OIDC](https://hedron.readthedocs.io/en/latest/guides/oidc/).

### Plain FastAPI

```python
from fastapi import FastAPI
from hedron import HTML, HedronRouter, Text, hedron_response, mount_hedron_static
from hedron.security.policy import SecurityPolicy

app = FastAPI()
app.state.hedron_security = SecurityPolicy.from_name("standard")
mount_hedron_static(app)
router = HedronRouter()


@router.get("/card", **hedron_response())
def card():
    return HTML(Text("plain"))


app.include_router(router)
```

### CLI

```bash
uvx --from "hedron>=0.25.0,<0.26" hedron new demoapp
cd demoapp && uv sync
uv run hedron --app app:app routes
uv run hedron --app app:app components
uv run hedron --app app:app preview home
uv run hedron check --format json --severity error
uv run hedron --app app:app graph
uv run hedron --app app:app audit-components
```

If `hedron` is not on your `PATH`, use `python -m hedron`.

## Links

- [Documentation](https://hedron.readthedocs.io/en/latest/)
- [Optional packages](https://hedron.readthedocs.io/en/latest/packages/)
- [What’s ready](https://hedron.readthedocs.io/en/latest/guides/whats-ready/)
- [Changelog](https://github.com/eddiethedean/hedron/blob/main/packages/hedron/CHANGELOG.md)
- [Source](https://github.com/eddiethedean/hedron/tree/main/packages/hedron)
- [Issues](https://github.com/eddiethedean/hedron/issues)
- [`hedron-core`](https://pypi.org/project/hedron-core/) ·
  [`hedron-flask`](https://pypi.org/project/hedron-flask/) ·
  [`hedron-django`](https://pypi.org/project/hedron-django/)

## License

MIT. See [LICENSE](LICENSE).
