Skip to content

Releases: pyxle-dev/pyxle

v0.4.2

09 Jun 09:15
d2a3b85

Choose a tag to compare

0.4.2

  • Live dev-server reconciliation. Editing a .pyxl in pyxle dev now applies route-shape changes without a restart — rename/add/remove a @server loader or @action, add or delete a page, wrap a page in a layout, change the head. Editing pyxle.config.json prints a clear 'restart to apply' warning instead of being silently ignored.
  • pyxle check works on a clean install. The JSX checker's parser deps are bundled into a self-contained extractor (via pyxle-langkit), so pyxle check runs after pip 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 init generates a gitignored .env.local with a random dev PYXLE_SECRET_KEY; the scaffold requirements.txt declares pyxle-framework itself; pyxle install warns on PEP 668 with venv guidance.

Upgrade: pip install --upgrade pyxle-framework

v0.4.1

08 Jun 10:24
2fe61c8

Choose a tag to compare

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 cache TTL now also governs how long its prefetched/seeded data stays fresh client-side. Routes without a cache entry default to 2 minutes (raised from 30s), tunable via the new navigation.defaultPrefetchTtl config option.

Upgrade: pip install --upgrade pyxle-framework

v0.4.0 — Edge caching, layout loaders, hardened errors

08 Jun 06:10
964b722

Choose a tag to compare

What's new in 0.4.0

  • Edge caching. Declare cacheable routes in pyxle.config.json::cache and pages are served Cache-Control: public, s-maxage=N (plus stale-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.pyxl or template.pyxl can declare its own @server loader; its result lands on the component's data prop, 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

03 May 16:54
0456ec8

Choose a tag to compare

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 endpointspages/api/*.py can export async 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 return invalidate_routes(response, ...) from an @action to refresh list views after mutations.
  • ActionError is auto-imported in any .pyxl with an @action.
  • <Head> coerces multi-part <title> children into a single string.
  • SSR worker pins LANG=en-US.UTF-8 by default (override via PYXLE_SSR_LOCALE) — fixes hydration mismatches from toLocaleString().
  • Vite resolver prefers pinned versionspyxle build runs npm install before falling back to npx --yes vite.

Install

pip install --upgrade pyxle-framework

v0.2.4

21 Apr 06:52
81e73ee

Choose a tag to compare

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> / useAction action-URL mismatches between SSR and client

Client components

  • <Head> — client useEffect rewrite. 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, and beforeInteractive;
    module-level promise dedup; cooperation with bootstrap-preloaded
    scripts; onLoad / onError; inline children via script.textContent.
  • <Image>placeholder=\"blur\" with blurDataURL or
    placeholderColor, fallbackSrc for graceful recovery on broken
    primary src, onLoad / onError with cache-hit detection, and a
    data-pyxle-image-state attribute 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 === 0 check, so fallbackSrc kicks in
    even when the native error event 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() in reference/client-api.md
  • Removed stale dev:css / build:css references across quick-start,
    project-structure, faq, deployment, and the pyxle init hint — the
    scaffold's actual flow is PostCSS-via-Vite, auto-run by pyxle 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, and head_elements to
    the RouteContext table in the middleware guide
  • Clarified the pyxle build chain description in the deployment guide

Tests

1141 passing (+14 new).

v0.2.3

15 Apr 18:11
b72f1bc

Choose a tag to compare

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_escape that round-trips escaped output through json.loads to 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

15 Apr 14:40
89a9864

Choose a tag to compare

v0.2.1

13 Apr 04:59
1f09d4d

Choose a tag to compare

Full Changelog: v0.2.0...v0.2.1

Pyxle v0.2.0 — File extension migration: `.pyx` → `.pyxl`

13 Apr 04:00
cc7fc54

Choose a tag to compare

v0.2.0

Breaking Changes

  • File extension changed from .pyx to .pyxl. All Pyxle page files now use the .pyxl extension. The .pyx extension was already used by Cython, causing GitHub to misclassify repositories, IDEs to default to Cython syntax highlighting, and confusion in search results. The new .pyxl extension 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 init scaffolds .pyxl files
  • pyxle check reports .pyxl file counts
  • error.pyxl and not-found.pyxl replace error.pyx and not-found.pyx as error boundary filenames
  • layout.pyxl and template.pyxl replace layout.pyx and template.pyx
  • JSX import rewriter handles the .pyxl.jsx specifier transform
  • All documentation updated

Full Changelog: v0.1.9...v0.2.0

v0.1.9

10 Apr 17:54
694837c

Choose a tag to compare

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