Skip to content

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:

from pyjinhx.builtins import PJXCard  # never pyjinhx.builtins.ui.pjx_card.pjx_card

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

Builtin graph components

Imported from pyjinhx.builtins. They are listed here because they carry a JavaScript API, window.pjx.graph, see the Graph guide.

Symbol Description Documentation
PJXGraph The stage of a pan/zoom node graph: canvas, viewport, node and edge layers Graph
PJXGraphNodes The node layer of a PJXGraph: a stable container of node markup Graph
PJXGraphNode One node card of a PJXGraph, absolutely positioned at (x, y) Graph
PJXGraphEdges The edge layer of a PJXGraph: one hidden span per edge Graph
PJXGraphControls Zoom in, zoom out and fit buttons that float over a PJXGraph canvas Graph
PJXGraphSidePanel A floating card beside a PJXGraph canvas: header plus one content region Graph

Builtin roster picker components

Imported from pyjinhx.builtins. They are listed here because they carry a JavaScript API, window.pjx.rosterPicker, see the Roster Picker guide.

Symbol Description Documentation
PJXRosterItem One entry, shown as a chip or a result row; a frozen pydantic model, not a component Roster Picker
PJXRosterPicker The picker: search box, results list, chips and their hidden inputs Roster Picker
PJXRosterResults One page of search results: what the app's search route returns Roster Picker
PJXRosterChip One removable chip with its hidden input Roster Picker

Conceptual guides

For usage patterns and tutorials, see: