skillfed

zthreading

A collection of wrapper classes for event broadcast and task management for python (Python Threads or Asyncio).

zthreading v0.1.19 695.3K downloads/30d#5,309 on PyPI1
License unclear LICENSE Abandoned released

What it is and what it does

zthreading wraps Python's threading and asyncio primitives to provide an event-driven interface for inter-thread communication and task scheduling. It centers on an EventHandler class that lets you register listeners for named events and emit them from any thread, plus a Task class that runs functions in separate threads or async loops and also acts as an EventHandler. The package includes decorators for common patterns: running a function as a background task, batching rapid consecutive calls, and catching OS signals.

The library is designed for scenarios where you want event-based coordination between threads without manually managing locks or queues. However, it has been abandoned since mid-2022 with no commits or releases since then, so it carries the risk of incompatibility with newer Python versions and asyncio changes.

Use it for:

  • Coordinate work across multiple threads using named events instead of manual queue management.
  • Run a long-running function in a background thread and listen for progress events it emits.
  • Batch rapid repeated calls (e.g., file saves) into fewer actual executions using the collect_consecutive_calls_async decorator.
  • Gracefully handle OS signals (SIGTERM, SIGINT) in a threaded application using the catch_signal decorator.
  • Stream events from a task as a Python generator, pausing the consumer until the producer emits the next event.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides event-driven communication and task management for Python threads and asyncio, with decorators for signal handling and call batching.

No. The package is abandoned (last commit 2022-06-21) with no maintenance signal. While it has low install friction and no known vulnerabilities, the lack of updates means it will likely break or behave unexpectedly on modern Python versions. For new projects, use standard library threading and asyncio primitives directly, or choose an actively maintained event library.

Install

zthreading on PyPI

pip

pip install zthreading

uv

uv add zthreading

poetry

poetry add zthreading

Installing zthreading

Before you install

Low install friction with no runtime dependencies. However, the package is abandoned—last release was 2022-06-13 and last commit 2022-06-21—so expect no maintenance, bug fixes, or compatibility updates.

License in practice

License file present but SPDX identifier unclear; the raw LICENSE file exists but its terms are not machine-readable from the metadata. Verify the actual license text in the repository before relying on it for commercial or copyleft-sensitive projects.

Quickstart

pip install zthreading

from zthreading.events import EventHandler
from zthreading.tasks import Task

handler = EventHandler()
handler.on("test", lambda msg: print(msg))

def work(msg):
    handler.emit("test", msg)

Task(work).start("hello").join()

Requires Python 3.6 or later; package is unmaintained and may have compatibility issues with modern Python versions.

Verify before relying

  • Whether the package works reliably with Python versions released after 2022-06-21 (asyncio API changes, deprecations).
  • Actual license terms and SPDX identifier—metadata lists 'unclear' treatment despite LICENSE file presence.
  • Whether event piping with weak references behaves correctly under garbage collection in current Python.

Package facts

License LICENSE (unclear)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 1,523 days since the last release
Last repo commit
First released
Downloads 695,294/month — #5,309 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: zthreading-0.1.19-py2.py3-none-any.whl

Tags

event handler python threadsasyncio task managementevent broadcast threadingsignal handling decoratorsthread pool event emitter
event-driventhreadingabandoned

More Application Frameworks packages