Skip to main content

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 interference
  • register_event_handler — bind a pattern against raw stdin; when it matches, a Message is 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

textual_drivers-0.3.0.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

textual_drivers-0.3.0-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

Details for the file textual_drivers-0.3.0.tar.gz.

File metadata

  • Download URL: textual_drivers-0.3.0.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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

Hashes for textual_drivers-0.3.0.tar.gz
Algorithm Hash digest
SHA256 0a3cc7f01d5cf750e10812788dc63994b7a13564d22f52483a3dc606482d5740
MD5 dda926dbb8f7d4bb99b1b75c39518706
BLAKE2b-256 d0fd626be2d0923edd0c3050cc440fdae575334b7569cdbd3d24f5fa8cfd10b6

See more details on using hashes here.

File details

Details for the file textual_drivers-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: textual_drivers-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 25.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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

Hashes for textual_drivers-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 655cd978618f9adc04c5fcbe5fd433178619260e093862ce045a18d880bb6add
MD5 12208536c7895f919447efe63f204b07
BLAKE2b-256 28f44603bee89d979fe915b241cabbee39960d159013c258f2904509be496fb1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page