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.1.3.tar.gz (15.9 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.1.3-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: textual_drivers-0.1.3.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for textual_drivers-0.1.3.tar.gz
Algorithm Hash digest
SHA256 645a74440231890545160fc5ca61443f9b421f34c25d7a9fc22f74b485cbc02f
MD5 74c1b121b249f9eacc28ae37e40ecbff
BLAKE2b-256 2195033fee8ef1fc821c4dc63a3d16e2ab95eb30fe23ae7f11b33b39d76f41c2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: textual_drivers-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for textual_drivers-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 05cbd08325f507feda9098c71657fc0415242241bb8ccb80702590aa5d013714
MD5 378a811a2ca162f11b8e5116f5558e8f
BLAKE2b-256 2ec2a8dc9d95b785115281b32d5c1214a8b429cde1a2eff8b13588c067d89a24

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