Skip to content

What's here and what's coming

Working today:

  • Components: XML templates with {{ }} and :attr bindings, two-way @bind for every form control, event handlers (methods, expressions or inline statements) with modifiers (@submit.prevent, @keydown.enter) and a detailed event object (keys, modifier keys, mouse, form fields), <If>/<For> with keyed lists, @property computed values, ref= with focus(), scroll_to() and keep_in_view(), and input masks (data-mask).
  • Composition: child components with props, events (emit) and lifecycle hooks; slots (named, with fallbacks and slot props); @bind on components; attributes passed through to a component's root element; components in subfolders as <folder.Name>, or imported from packages (ComponentLibrary), shipped to the browser from your environment; Store for state many components share; <Dynamic :is> for a component chosen at runtime.
  • Pages: router("pages") turns a folder into screens, with <Link>, navigate(), Back/Forward, typed {params} and query values as fields.
  • Reacting to change: @effect methods with automatic dependency tracking and cleanup; state_has_changed() for changes from timers and callbacks.
  • Async: async def handlers and on_init, self.start_task() for background work, cancellation when a component is removed.
  • Heavy work: run_in_background() runs a function in a Web Worker, so the page stays responsive; on a thread outside the browser.
  • Styling: scoped <style> blocks, global .css files, head.html for CDN stylesheets and scripts, an assets/ folder, so CSS frameworks such as Tailwind and Bootstrap work.
  • Desktop: pyweft run --desktop opens the same app in a native window, with Python running on your machine and hot reload included; the window's size and the like come from [tool.pyweft.desktop]. pyweft build --desktop makes it a single program to hand out (an .exe, .app or Linux program) with nothing to install.
  • Files and dialogs: pyweft.dialogs opens and saves files and asks for confirmation with one API: the browser's picker and downloads on the web, the system's dialogs on the desktop.
  • Title and icon: [tool.pyweft] names the app and gives it an icon for the browser tab and the window; set_title() changes the title as the app runs.
  • Tooling: pyweft new / run / build; hot reload that keeps state, with an error overlay; the first screen rendered ahead of time, so pages appear at once; a customizable loading screen that shows real progress; PyPI dependencies from pyproject.toml, installed in the browser.
  • Data in and out: pyweft.http calls web APIs and loads the app's data files; pyweft.storage keeps data between visits. Same code on both targets.
  • Controls: pyweft-ui, 63 ready-made, themeable controls: layout, form fields with validation, autocomplete, chips, sliders and masks, date and date-range pickers, calendars of events, charts, menus, tabs, tables, dialogs, toasts (see "Ready-made controls" in section 5), with a live gallery.
  • Releases: pyweft and pyweft-ui on PyPI.

Coming next: a faster first start that also works offline, pyweft check for errors without running the app, and installers (.msi, .dmg) and code signing for desktop apps.