JohnTheNerd/PySarra
CLILive in productionA Python application that can read from Sarracenia and relay the messages however you'd like. It is designed to be significantly simpler than the official clien
A Python Sarracenia client without any of the bells-and-whistles.
No GitHub topics on this repo.
- Python100.0%
1 Review
PySarra has a clear, useful niche: it strips Sarracenia consumption down to a small Python client that can subscribe to Environment Canada datamart topics and hand matching messages to user-defined processors. I like that the project is intentionally modest instead of trying to wrap every feature of the official client. The processor model is easy to understand: config.json maps a topic, optional regex, and processor module, while examples show printing, Google Pub/Sub, and AWS SQS relay patterns. That makes the repo approachable for someone who just wants to bridge weather feed notifications into their own infrastructure.
The main adoption gap is reliability polish. main.py is compact, but a few behaviors deserve attention before users depend on it unattended. The queue name is generated as a class variable, so multiple configured tasks appear to share the same anonymous queue name instead of isolating per consumer. The restart loop also recreates ECConsumer(task) using the last task from the earlier loop, which could restart the wrong subscription when more than one task is configured. I’d also replace self.topic.lstrip('*.WXO-DD.') because lstrip removes any matching characters, not the exact prefix. Documentation could go one step further with a full sample message, expected AMQP payload shape, processor error behavior, and a note about credentials for Pub/Sub/SQS. There are no tests or CI yet, but the surface area is small enough that a few unit tests around routing-key construction, regex filtering, URL parsing, and restart behavior would add a lot of confidence quickly.
