Registry / devops / csrd-message

csrd-message

JSON →
library0.5.28pypypi✓ verified 85d ago

Messaging abstractions for publisher/consumer workflows with optional RabbitMQ and Kafka backends. Current version 0.5.28, requires Python >=3.12. Follows semantic versioning; breaking changes may occur in minor versions before 1.0.

pip install csrd-message
INSTALL
IMPORT
SIG · CSRD-MESSAGE
C
csrd-message
devopspythonv0.5.28
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MessagePublisher
from csrd.message import MessagePublisher
from csrd_message import MessagePublisher
Use dot notation with the package root 'csrd.message', not the pypi name.
MessageConsumer
from csrd.message import MessageConsumer
from csrd.message.consumer import MessageConsumer
Direct import from top-level csrd.message is preferred; submodule may change.
RabbitMQPublisher
from csrd.message.backends.rabbitmq import RabbitMQPublisher
from csrd.message.rabbitmq import RabbitMQPublisher
Backend classes live under csrd.message.backends.

Basic RabbitMQ publisher setup.

import os from csrd.message import MessagePublisher from csrd.message.backends.rabbitmq import RabbitMQPublisher publisher = RabbitMQPublisher( host=os.environ.get('RABBITMQ_HOST', 'localhost'), port=int(os.environ.get('RABBITMQ_PORT', '5672')) ) # Alternatively, use the generic publisher: # publisher = MessagePublisher(backend='rabbitmq', host='localhost') async def main(): await publisher.connect() await publisher.publish('my.routing.key', {'data': 'hello'}) await publisher.close() # Run with asyncio.run(main())
Debug
Known issues
breakingBreaking changes in minor versions before 1.0: Backend classes may be renamed or moved to new submodules. Always check changelog when upgrading.
fix
Pin to exact version or test thoroughly.
affects: 0.x
gotchaRequires Python 3.12+; older Python versions are not supported. Installation will fail on Python <3.12.
fix
Use Python 3.12 or later.
affects: all
deprecatedThe 'MessagePublisher' generic factory may be deprecated in future releases in favor of explicit backend usage.
fix
Use backend-specific publishers (e.g., RabbitMQPublisher) directly.
affects: 0.5.x
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'csrd.message'
Using hyphens in package name (csrd-message) instead of dots.
fix
Import as 'csrd.message' (dots).
AttributeError: module 'csrd.message' has no attribute 'publish'
Trying to use package-level function that doesn't exist; must instantiate a publisher first.
fix
Create a Publisher instance and call its .publish() method.
RuntimeError: Event loop is closed
Running async code without a proper event loop (e.g., in a script without asyncio.run).
fix
Use asyncio.run(main()) to execute async functions.
Upgrade
Version history
0.5.28latest on PyPI · released May 18, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
csrd-message — pip install csrd-message · libregistry