Public API Index¶
Every symbol exported from pyjinhx (__all__) is listed below with a one-line description and a link to detailed documentation.
These 17 symbols are the entire top-level public API. Everything else — pyjinhx.session, pyjinhx.assets, pyjinhx.client, pyjinhx.dev, pyjinhx._component, pyjinhx.reactive.* — is internal: importable, documented where it is genuinely useful, but outside __all__ and free to change. If a page shows you one of those imports, it is telling you there is no public spelling yet.
The one other supported import path is the builtin UI kit, which has its own short public path:
The deeper machinery behind these symbols — the parser, finder, asset resolver, integration backend, cache/invalidation, and the Redis/SQLite backends — is documented under API Reference → Internals.
Components & rendering¶
| Symbol | Description | Documentation |
|---|---|---|
BaseComponent |
Pydantic base class for UI components with Jinja templates | BaseComponent |
Slot |
Annotated type for a string/component/collection field rendered as raw markup | BaseComponent |
Children |
Annotated type for the field that receives a tag's nested markup | BaseComponent |
component() |
Reference an html-only template (no hand-written class) from Python | BaseComponent |
ReactiveComponent |
Base class for dependency-aware reactive components (react={...} class keyword + load()) |
Reactive API |
render() |
Render a component to a finished HTML string | Renderer |
RenderSession |
Per-render state: Jinja environment, asset accumulation, on_rendered hooks |
Renderer |
App wiring¶
| Symbol | Description | Documentation |
|---|---|---|
setup() |
Single-call process + optional FastAPI wiring | Configuration |
PjxContext |
Read-only, request-scoped view of session, dirtied keys, and cache state | Mutations, Keys & PjxContext |
Reactive authoring¶
| Symbol | Description | Documentation |
|---|---|---|
mutates() |
Decorator: invalidate cache and accumulate dirtied keys after mutation | Mutations, Keys & PjxContext |
dirty() |
Imperatively dirty reactive keys without decorating a function | Mutations, Keys & PjxContext |
MutationKey |
Base StrEnum for app-level reactive key constants |
Mutations, Keys & PjxContext |
reactive_key() |
Build a reactive key from a type and an instance-key value | Mutations, Keys & PjxContext |
PjxKey |
Marker for Annotated[..., PjxKey()] fields stamped as data-pjx-load |
Mutations, Keys & PjxContext |
AppContext |
Subclassable base for an app's per-request context, injected into load() |
Mutations, Keys & PjxContext |
Configuration¶
| Symbol | Description | Documentation |
|---|---|---|
PjxSettings |
Invalidation backend and reactive dev flags | Configuration |
AssetMode |
Enum: INLINE, LINK or NONE |
Renderer |
Conceptual guides¶
For usage patterns and tutorials, see:
- Usage tiers — bare components through full reactive wiring
- Reactivity — reactive components, OOB swaps, cache scopes
- Integration Backend — the adapter Protocol a framework backend implements, plus request-scoped load context
- Asset Collection — delivery modes, dedup, static serving
- Build an App — end-to-end tutorial
- FastAPI integration — request scope, lifespan, headers