You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
- Enhanced API documentation with more detailed explanations and examples- Improved worker thread pattern implementation with better lifecycle management- Added thread-safe property support with notification signals- Enhanced error handling and logging throughout codebase- Implemented graceful shutdown utilities- Added connection type AUTO_CONNECTION for dynamic connection behaviorTechnical improvements:- Refactored signal/slot connection logic for better thread safety- Enhanced worker thread pattern with proper thread affinity handling- Added context variables for emission tracking- Improved test coverage and organization- Updated code formatting and linting configurations
Are you looking for a signal/slotpattern in Python without Qt dependencies? TSignalprovidesa lightweight,thread-safe,andasyncio-compatibleimplementation that gives you allthepower of Qt's signal/slot pattern without the heavyweight dependencies.Perfect for:
3
+
TSignal is a lightweight, pure-Python signal/slotlibrary thatprovides thread-safe, asyncio-compatibleevent handling inspired bytheQt signal/slot pattern—but without the heavyweightQtdependencies.It enables clean decoupling of components, seamless thread-to-thread communication, and flexible asynchronous/synchronous slot handling.
4
4
5
-
- Async applications needing event handling
6
-
- Thread communication in Python applications
7
-
- Event-driven architectures
8
-
- Decoupled component communication
5
+
##Key Features
6
+
7
+
-**Pure Python**: No Qt or external GUI frameworks needed.
8
+
-**Async/Await Friendly**: Slots can be synchronous or asynchronous, and integrate seamlessly with asyncio.
9
+
-**Thread-Safe**: Signal emissions and slot executions are automatically managed for thread safety.
10
+
-**Flexible Connection Types**: Direct or queued connections, automatically chosen based on the caller and callee threads.
11
+
-**Worker Thread Pattern**: Simplify background task execution with a built-in worker pattern that provides an event loop and task queue in a dedicated thread.
12
+
-**Familiar Decorators**: Inspired by Qt’s pattern,`@t_with_signals`,`@t_signal`, and`@t_slot` let you define signals and slots declaratively.
9
13
10
14
##Why TSignal?
11
-
- 🚀 Pure Python implementation - no Qt or external dependencies required
12
-
- ⚡ Async/await support out of the box
13
-
- 🔒 Thread-safe signal emission and slot execution
14
-
- 🎯 Simple, decorator-based API similar to Qt
15
-
- 🔄 Automatic thread handling for cross-thread signals
15
+
16
+
Modern Python applications often rely on asynchronous operations and multi-threading. Traditional event frameworks either require large external dependencies or lack seamless async/thread support. TSignal provides:
17
+
18
+
- A minimal, dependency-free solution for event-driven architectures.
19
+
- Smooth integration with asyncio for modern async Python code.
20
+
- Automatic thread-affinity handling so cross-thread signals "just work."
21
+
- Decorator-based API that’s intuitive and maintainable.