Drop-in Textual drivers with lock_stdin, register_event_handler, and kitty DnD support
Project description
textual-drivers
Drop-in subclasses of Textual's built-in terminal drivers with two extra capabilities:
lock_stdin: pause the driver's stdin thread and silence terminal events so you can run terminal queries or subprocesses without interferenceregister_event_handler: bind a pattern against raw stdin; when it matches, aMessageis posted into Textual's event system
A higher-level DNDApp base class builds on these to implement the full kitty drag-and-drop protocol (drag-in and drag-out).
Installation
uv add textual-drivers
Quick start
from textual_drivers import DrivenApp
class MyApp(DrivenApp):
...
MyApp().run()
DrivenApp picks the right platform driver automatically.
Documentation
Full docs are on the wiki:
- Drivers: driver classes,
DrivenApp, and mixin usage - lock_stdin: exclusive stdin ownership for terminal queries and subprocesses
- register_event_handler: pattern-based raw stdin → Textual message routing
- DnD: kitty drag-and-drop protocol via
DNDApp
The docs/ folder in this repo mirrors the wiki and can be pushed to it with:
./sync-wiki.sh
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 Distribution
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_drivers-0.3.1.tar.gz.
File metadata
- Download URL: textual_drivers-0.3.1.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.22 {"installer":{"name":"uv","version":"0.11.22","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 |
1bfe0ea9d959d7ed594fcf7e69e48a41c66aa950c827d2d8505590639352b9cf
|
|
| MD5 |
b07f45f737ad1244ea35f819fdfeb099
|
|
| BLAKE2b-256 |
0b665632860ecb4479b987f1c30f643e73388d725d1213e80e43306ea29cd20a
|
File details
Details for the file textual_drivers-0.3.1-py3-none-any.whl.
File metadata
- Download URL: textual_drivers-0.3.1-py3-none-any.whl
- Upload date:
- Size: 25.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.22 {"installer":{"name":"uv","version":"0.11.22","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 |
3f20fa82f6c34b6edf38f96852b5b80c24f7961c9791087cc48c37fd739629d7
|
|
| MD5 |
726af2db0a636b5dc7bc0fbf824bff1c
|
|
| BLAKE2b-256 |
4c382935a3f5d5579f16ae260c18c3170a367d575a987097ecd9f7b693cc7faa
|