Releases: pyxle-dev/pyxle
v0.4.2
0.4.2
- Live dev-server reconciliation. Editing a
.pyxlinpyxle devnow applies route-shape changes without a restart — rename/add/remove a@serverloader or@action, add or delete a page, wrap a page in a layout, change the head. Editingpyxle.config.jsonprints a clear 'restart to apply' warning instead of being silently ignored. pyxle checkworks on a clean install. The JSX checker's parser deps are bundled into a self-contained extractor (viapyxle-langkit), sopyxle checkruns afterpip install 'pyxle-framework[langkit]'with no extra npm setup.- Locale-independent SSR. The Python↔Node SSR transport pins UTF-8, so emoji / non-BMP characters in components or loader data no longer crash rendering under a non-UTF-8 locale (
LANG=C). - Smoother first run.
pyxle initgenerates a gitignored.env.localwith a random devPYXLE_SECRET_KEY; the scaffoldrequirements.txtdeclarespyxle-frameworkitself;pyxle installwarns on PEP 668 with venv guidance.
Upgrade: pip install --upgrade pyxle-framework
v0.4.1
0.4.1
- No more double loader run on first load. The page you land on is seeded into the client navigation cache from the server render, so the active nav link's prefetch resolves from cache instead of re-fetching — the loader runs once, not twice. Back/forward navigation to the page is instant for the same reason.
- Per-route navigation-cache TTL. A route's
cacheTTL now also governs how long its prefetched/seeded data stays fresh client-side. Routes without acacheentry default to 2 minutes (raised from 30s), tunable via the newnavigation.defaultPrefetchTtlconfig option.
Upgrade: pip install --upgrade pyxle-framework
v0.4.0 — Edge caching, layout loaders, hardened errors
What's new in 0.4.0
- Edge caching. Declare cacheable routes in
pyxle.config.json::cacheand pages are servedCache-Control: public, s-maxage=N(plusstale-while-revalidate) so a CDN or reverse proxy can absorb traffic instead of your origin. The per-user CSRF cookie is automatically omitted from cacheable responses. - Layout & template loaders. A
layout.pyxlortemplate.pyxlcan declare its own@serverloader; its result lands on the component'sdataprop, just like a page — so shared UI (nav bars, the signed-in user, the framework version) loads once per request without repeating the loader in every page. - Hardened production errors. SSR render failures — including the SPA-navigation JSON path — are sanitized in the response (no exception type, message, or path leaks to the client) while the full error is written to the server log for operators.
- Faster static serving. The static-asset middleware indexes public/client paths up front, skipping a per-request filesystem
stat+ exception on every dynamic request.
Upgrade: pip install --upgrade pyxle-framework
Full notes: see the Changelog.
v0.3.0 — Plugin system + framework polish
Highlights
First-class plugin system
Compose apps via pyxle.config.json::plugins — Django-style INSTALLED_APPS. Plugins register services through a PluginContext, hook into the ASGI lifespan, and contribute middleware.
{
"plugins": [
"pyxle-db",
{
"name": "pyxle-auth",
"settings": { "cookieDomain": ".example.app" }
}
]
}Resolve services Django-style:
from pyxle_auth import get_auth_service
@action
async def sign_in(request):
auth = get_auth_service()
...See: Plugins guide, Plugins API reference.
First-party plugins (separate packages)
pyxle-db— SQLite-first database with migrations, WAL, connection pooling.pyxle-auth— Email+password sessions, argon2id, sliding expiration, per-IP/per-email rate limits.
Framework fixes (surfaced by Pyxle Cloud work)
- WebSocket endpoints —
pages/api/*.pycan exportasync def websocket(ws)for live updates and chat. - Client navigation cache with TTL + invalidation — loader payloads cached 30s; call
invalidate(url)on the client or returninvalidate_routes(response, ...)from an@actionto refresh list views after mutations. ActionErroris auto-imported in any.pyxlwith an@action.<Head>coerces multi-part<title>children into a single string.- SSR worker pins
LANG=en-US.UTF-8by default (override viaPYXLE_SSR_LOCALE) — fixes hydration mismatches fromtoLocaleString(). - Vite resolver prefers pinned versions —
pyxle buildrunsnpm installbefore falling back tonpx --yes vite.
Install
pip install --upgrade pyxle-frameworkv0.2.4
Pyxle Kit (the new pyxle/client reference demo) exercises every
client component in one place, so this release implements or
hardens the ones that were still stubs or racy on hydration.
Highlights
SSR pathname plumbing
The worker pool now propagates the request path into the Node SSR
runtime, which sets globalThis.__PYXLE_CURRENT_PATHNAME__ for the
duration of the render. This eliminates:
- hydration mismatches on
usePathname()(e.g. active-link highlighting) <Form>/useActionaction-URL mismatches between SSR and client
Client components
<Head>— clientuseEffectrewrite. Adopts SSR-rendered head
nodes by key attribute (no duplicates on hydration), restores the
previous<title>on unmount.<Script>— full implementation, not a stub. Strategies
afterInteractive(default),lazyOnload, andbeforeInteractive;
module-level promise dedup; cooperation with bootstrap-preloaded
scripts;onLoad/onError; inline children viascript.textContent.<Image>—placeholder=\"blur\"withblurDataURLor
placeholderColor,fallbackSrcfor graceful recovery on broken
primarysrc,onLoad/onErrorwith cache-hit detection, and a
data-pyxle-image-stateattribute for CSS-only fade transitions.
Also fixes a hydration race: a terminal-error on an SSR-rendered
src(e.g. a 404 avatar) is now recovered via the post-mount
complete && naturalWidth === 0check, sofallbackSrckicks in
even when the nativeerrorevent fired before React hydrated.usePathname()— reads the SSR pathname global so the first
client render matches SSR, then subscribes to framework navigation
events for reactive updates.
Documentation
Resolved the 8-item docs/framework parity audit:
- Documented
usePathname()inreference/client-api.md - Removed stale
dev:css/build:cssreferences across quick-start,
project-structure, faq, deployment, and thepyxle inithint — the
scaffold's actual flow is PostCSS-via-Vite, auto-run bypyxle dev - Updated the quick-start landing-page description and the
project-structure loader example to match the scaffold's real output - Added
source_absolute_path,content_hash, andhead_elementsto
theRouteContexttable in the middleware guide - Clarified the
pyxle buildchain description in the deployment guide
Tests
1141 passing (+14 new).
v0.2.3
v0.2.3 — Release Notes
🐛 Bug Fix
SSR props no longer break JSON.parse on pages containing <!-- or -->
The inline-JSON escaper (pyxle.ssr._escape.escape_inline_json) previously rewrote HTML-comment sequences with backslash escapes that are not valid JSON:
<!--→<\!--←\!is not a legal JSON escape-->→--\>←\>is not a legal JSON escape
Any page whose props contained a literal --> (very common in docs that quote shell output, code examples, or arrow markers) would fail at hydration with:
[Pyxle] Failed to parse initial props
SyntaxError: Bad escaped character in JSON
The fix swaps the problematic replacements for Unicode escapes — which are valid JSON — and still neutralise the HTML-tokenizer sequences:
<!--→\u003c!---->→--\u003e
🧪 Tests
- Added a parametrised
test_output_is_valid_json_after_escapethat round-trips escaped output throughjson.loadsto catch this class of regression. - 1127 total tests, all passing.
📦 Install
pip install --upgrade pyxle-framework==0.2.3🙏 Migration
None. This is a pure bug fix — existing apps just need to redeploy with 0.2.3 to get correct behaviour.
v0.2.2 — Release Notes
Full Changelog: v0.2.1...v0.2.2
v0.2.1
Full Changelog: v0.2.0...v0.2.1
Pyxle v0.2.0 — File extension migration: `.pyx` → `.pyxl`
v0.2.0
Breaking Changes
- File extension changed from
.pyxto.pyxl. All Pyxle page files now use the.pyxlextension. The.pyxextension was already used by Cython, causing GitHub to misclassify repositories, IDEs to default to Cython syntax highlighting, and confusion in search results. The new.pyxlextension is unique and maps clearly to the Pyxle name.
Migration
Rename your page files and update any cross-page imports:
find pages/ -name '*.pyx' -exec bash -c 'mv "$1" "${1%.pyx}.pyxl"' _ {} \;// Before
import { useTheme } from './layout.pyx';
// After
import { useTheme } from './layout.pyxl';See the full migration guide for details.
What's Changed
- Compiler, scanner, CLI, error pages, registry, and layout resolver all recognize
.pyxl pyxle initscaffolds.pyxlfilespyxle checkreports.pyxlfile countserror.pyxlandnot-found.pyxlreplaceerror.pyxandnot-found.pyxas error boundary filenameslayout.pyxlandtemplate.pyxlreplacelayout.pyxandtemplate.pyx- JSX import rewriter handles the
.pyxl→.jsxspecifier transform - All documentation updated
Full Changelog: v0.1.9...v0.2.0
v0.1.9
What's new
Navigation progress bar
A horizontal progress bar appears at the top of the page when navigating to non-prefetched pages. Shows after a 150ms delay (avoids flashing on fast navigations), uses a decay easing animation, respects prefers-reduced-motion, and includes ARIA progressbar accessibility.
##Language toolkit support
Pyxle now supports pip install pyxle-framework[langkit] as an optional extra, installing pyxle-langkit for IDE support — LSP server, linter, VS Code extension, and CLI tools.
##Architecture documentation
New docs/architecture/ section with 10 detailed pages covering the parser, compiler, routing, dev server, SSR pipeline, build system, runtime, and CLI internals.
##AI agents guide
New docs/guides/for-ai-agents.md — positions Pyxle as the framework most optimized for AI coding agents with side-by-side comparisons and technical reasoning.
##Editor setup guide
New docs/guides/editor-setup.md — covers VS Code extension installation, language server setup, CLI tools, Neovim/Sublime configuration, and troubleshooting.
##Bug fixes
- fix(devserver): Prevent cached navigation JSON from replacing HTML when restoring a backgrounded tab. Added Vary: x-pyxle-navigation and Cache-Control headers, plus a pageshow BFCache handler on the client.
- fix(ssr): Production error responses no longer leak exception type, message, or the dev-mode Vite script tag. Generic error page shown in production.
- fix(compiler): Guard against MemoryError/RecursionError from deeply nested expressions in the parser. Added defensive per-file exception handling in pyxle check.
- fix(compiler): Detect broken Python leaking into JSX segments via a JSX-toplevel-prefix whitelist. Suppress cascade diagnostics when Python errors exist.
- Other changes
- JSX component promoted as the recommended approach for head management across all docs
- Removed legacy # --- client --- fence marker from scaffold template
- Author email updated to dev@pyxle.dev
Full Changelog: v0.1.8...v0.1.9