Skip to content

v0.7.3 — small, curated public API (45 → 11 symbols)

Choose a tag to compare

@paulomtts paulomtts released this 09 Jun 23:56
· 200 commits to master since this release

A focused public-API redesign: the top-level pyjinhx surface shrinks from 45 symbols to 11 — just what you need to build an app. Everything removed stays importable from its submodule for advanced use.

⚠️ Breaking (alpha). Renames and removals; see migration below.

The public surface (11)

BaseComponent, ReactiveComponent, Renderer, setup, Registry, mutates, MutationKey, PjxKey, PjxContext, PjxSettings, AssetMode.

Highlights

  • Shrunk ~32 internals out of the top level (oob_swaps, LoadCache, Invalidation*, manifest/header classes + constants, ClientBackend/FastAPIClientBackend, asset-resolver helpers, Finder/Parser/Tag, dev tooling, configure_pyjinhx/shutdown_pyjinhx/pyjinhx_lifespan). Still importable from submodules.
  • Renamed for clarity + a consistent Pjx* prefix: PjxLoad → PjxKey, LoadContext → PjxContext, PyJinhxSettings → PjxSettings, StateKey → MutationKey.
  • Removed client_script from the surface — the runtime auto-injects on root renders (from pyjinhx.client import client_script for raw shells).
  • Cache scope is now derived from the backendCacheScope, the cache_scope argument, and PJX_LOAD_CACHE_SCOPE are gone. A cross-worker invalidation backend (Redis) → PROCESS (cross-request caching, kept consistent across workers); none → REQUEST (per-request, the only multi-worker-safe default). This removes a whole class of misconfiguration.

Migration

  • New names: PjxKey, PjxContext, PjxSettings, MutationKey.
  • from pyjinhx import client_scriptfrom pyjinhx.client import client_script.
  • setup(app, cache_scope=CacheScope.PROCESS, invalidation_backend=redis)setup(app, invalidation_backend=redis) (PROCESS is derived).
  • Internals: from pyjinhx.<module> import … (e.g. from pyjinhx.cache import LoadCache).

Full changelog: v0.7.2...v0.7.3