Cashmere is an async-python library built to enable a light-weight event driven communication architecture.
The current implementation leverages AWS SNS and AWS SQS.
Event names have corresponding topics created in AWS SNS. Event subscribers have corresponding queues created in AWS SQS. These SQS queues are then subscribed to SNS topics for the corresponding events.
When an event is emitted, all subscribers will receive a copy of the event.
All subscribers are expected to be Async functions.
- Memory and Concurrency management options.
- Clear decoupling between clients and consumers.
- An interface that can support other back-ends in the future (e.g. RMQ, Redis.)
- A simple dependency injection system for subscribing handlers.
- Add a CashmereCollection class to combine and run multiple Cashmere apps at once.
- Add a graceful shutdown solution for ctrl+c and sig-term moments.
--
All instructions are for MacOS
You will need
- Brew
- Python 3.11
- Poetry
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install pyenv
pyenv install 3.11
Set your python version before you install poetry
pyenv shell 3.11
Install Poetry
pip install poetry
brew install pre-commit
You will run these two commands every time you open a new shell environment for this project. The commands must be run in the project's root directory.
pyenv shell 3.11
poetry shell
poetry install --sync --with=dev
pre-commit install