--- id: pypubsub version: "4.0.7" license: BSD-2-Clause license_treatment: permissive maintenance: active --- # Pypubsub — Python Publish-Subscribe Package License: permissive · Maintenance: active · Downloads: 324.0K/mo ## What it is and what it does Pypubsub is a pure-Python publish-subscribe library that implements event-driven messaging within a single process. It centers on the concept of topics: publishers send messages to named topics, and subscribers register listeners to receive those messages. The package works on Python 3.7 through 3.14 and has no external runtime dependencies, making it lightweight and easy to integrate into desktop or server applications. The library is designed for applications that need decoupled, event-based communication between components running in the same process. It supports advanced features for debugging and managing topics and messages in larger applications, though the core use case is straightforward topic-based message dispatch where senders and receivers don't need to know about each other directly. Use it for: - Build event-driven GUI applications where UI components emit and listen to application state changes without tight coupling. - Implement observer patterns in server applications where different modules need to react to the same business events. - Create plugin architectures where plugins can subscribe to and emit events without direct dependencies on each other. - Decouple data model updates from view updates in desktop applications using topic-based notifications. - Coordinate multi-step workflows where each step publishes completion events that trigger downstream actions. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a publish-subscribe messaging system for event-driven architecture within a single Python process, where publishers send messages to named topics and subscribers receive them. Yes. Pypubsub is a stable, actively maintained library with no dependencies, permissive licensing, and broad Python version support. It solves a clear problem—decoupled in-process messaging—with a simple, proven API. Choose it if you need event-driven architecture within a single process and want to avoid the complexity of external message brokers. ## Install pip install pypubsub uv add pypubsub poetry add pypubsub ## Installing Pypubsub Before you install: Low friction: pure Python with no runtime dependencies, distributed as a wheel, and actively maintained with a recent release in December 2025. License in practice: BSD-2-Clause is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you retain the license notice. Quickstart: pip install pypubsub import pypubsub # Subscribe a listener to a topic, then send a message to it Requires Python 3.7 or later. Verify before relying: - Specific API methods and call signatures for subscribing listeners and sending messages. - Whether the package supports thread-safe or async message delivery patterns beyond basic synchronous dispatch. - Performance characteristics when handling high message volume or deeply nested topic hierarchies. ## Package facts - License: BSD-2-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 324.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags publish subscribe messaging, event-driven architecture python, observer pattern implementation, topic-based message dispatch, in-process event system, signal and event handling, message broker single process, event-driven, messaging, observer-pattern [View on SkillFed](https://skillfed.io/packages/pypubsub) · [View on PyPI](https://pypi.org/project/pypubsub/)