
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Package for easy management of state/event signal publishing, subscribing, and responding
A python package for handling state/event signals
Adds two new, simple-to-use objects:
Also provides two dataclass specifications:
Combining redis pubsub features with state signal + response protocols, these additions make state signal publishing, subscribing, receiving, and responding incredibly easy to integrate into any python code.
See full documentation here
The state-signals PyPI package is available here
pip install state-signals
There are also state-signals RPMs available:
python36-state_signals
python3-state_signals
The use of this module requires the existence of an accessible redis server.
yum install redis
(or replace yum with package manager of choice).A redis server can be started with the redis-server
command.
--port (port)
redis-server \path\to\config
See https://redis.io/ for more details and usage
Note that state-signals also works with any redis-compatible pub/sub databases (like KeyDB)
The Signal
and Response
dataclasses define the exact fields/format of signal and response payloads.
Publishing, receiving, and responding mechanisms are all detailed in SignalExporter
and SignalResponder
documentation. Below are details on the subscribing/awaiting protocol.
Accept Subscribers and Awaiting Responses:
SignalExporter
, call an exporter.initialize(legal_events, ...)
SignalExporter
will now wait for (up until timeout) and read the responses of the subscribers after publishing any further signals with exporter.publish_signal(event, ...)
exporter.shutdown(...)
will stop the subscriber listener, wipe the subscriber list, and publish a "shutdown" signal
Sending Responses
SignalResponder
respond
method and pass in the publisher_id
of the signal's publisher, and pass in the event
being responded to.srespond(signal, ...)
: A method where the user can simply pass in the received signal object they wish to respond to instead of the signal's id/eventInitialization and Subscribing:
Publishing, Awaiting, and Responding:
See the full documentation for further details, options, and more
Formatting
pip install black==22.3.0
black --check (file)
black --check .
from the top-level--check
optionTesting
pip install
for pytest
and pytest-mock
pytest -v
from the top-leveltests
folderredis-server
for the functional tests to passBoth formatting checks and tests must pass for GH Actions to approve a commit
FAQs
Package for easy management of state/event signal publishing, subscribing, and responding
We found that state-signals demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.