inact
AI-oriented web framework built on Flask. Every route returns plain text by default (curl/agent-friendly), with automatic HTML rendering at /_human/<path> for humans.
Install
pip install inact
Quick start
from inact import Inact, MdContent, TomlContent
app = Inact(__name__)
@app.inact_md("/")
def index():
return MdContent("# Hello\n\nThis is an agent-friendly page.", title="Home")
@app.inact_toml("/status")
def status():
return TomlContent({"service": {"status": "running"}}, annotation="GET /status")
app.mount("/docs", "./docs/")
app.run()
Features
inact_md— Markdown + frontmatter routes. Plain text for agents, rendered HTML at/_human/<path>.inact_toml— TOML routes with optional# annotationlines at the top./_human/<path>— Auto-registered HTML rendering for every route and mounted file./.help— Contextual help on every path, inherited from nearest ancestor if not defined.mount(prefix, folder)— Serve a local folder with/.ls(file listing) and/.grep?q=(content search).
Response types
| Handler returns | Agent sees | Human sees (/_human/) |
|---|---|---|
MdContent(body, **meta) |
plain markdown | rendered HTML |
TomlContent(data, annotation=...) |
TOML with # comment header |
structured HTML |
raw str |
string as-is | detected and rendered |
License
MIT
Release files for inact 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| inact-0.1.0.tar.gz | 26.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| inact-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.0 kB
Release files / inact-0.1.0.tar.gz
| Download URL | inact-0.1.0.tar.gz |
|---|---|
| Size | 26.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60a5b90786f710491ecc88fde9e1b2b83f213ea554d4d3800553298cfa243834
|
|
BLAKE2b-256 checksum How to use checksums |
bf204d7d7fcfdcb75e48d7fb3e343ecba0641340c19153215fdce3befc7a386c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / inact-0.1.0-py3-none-any.whl
| Download URL | inact-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0aa7618181916e272b2537747801166563bcf774a106c17e989bc892ccc65f49
|
|
BLAKE2b-256 checksum How to use checksums |
d92847ee4e6e8e07a198144ed229f85b1f7a7c9dea5d48beaa85eb476436292d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|