Hot Module Reloading for Textual apps
Project description
textual-hmr
Provides Hot Module Reloading for Textual apps.
It acts as a small runner for Textual development: save Python files, and the current app instance exits so the updated app can be started again in the same Python process. When you export an App subclass, textual-hmr also enables Textual's built-in CSS watching by default.
CLI Usage
If your app class is named DemoApp in ./main.py, run:
textual-hmr ./main.py:DemoApp
Or use a module import path:
textual-hmr my_package.main:DemoApp
The target may be:
- an
Appsubclass - an
Appinstance - a zero-argument callable returning an
App
Options
textual-hmr --help
The command supports:
--watch PATH: additional file or directory paths to watch--ignore PATH: file or directory paths to ignore--headless: run without terminal output--inline: use Textual inline mode--inline-no-clear: preserve inline output after exit--no-mouse: disable mouse support--clear: clear the terminal before restarting after changes--no-watch-css: do not enable Textual's CSS watcher when the target is anAppsubclass
Notes
- This package is currently optimized for the common dev loop of restarting a Textual app quickly in-process when code changes.
- It does not attempt to preserve widget state across app restarts.
- For CSS-only changes, Textual's own watcher is usually the smoother path;
textual-hmrenables that automatically for exported app classes unless you disable it.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file textual_hmr-0.0.1-py3-none-any.whl.
File metadata
- Download URL: textual_hmr-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a0252966b7416a2d8aad74d1e6c4a778f533d7a4e0b3c7f948a5d437db6c722
|
|
| MD5 |
54ec2b277030ff4b524eb8211dc15acd
|
|
| BLAKE2b-256 |
ef62986ac2f62b68f11f1d103f05544df6d4eba8b8f820d12f6b8c4c07e4479d
|