Loafer
Asynchronous message dispatcher - Currently using asyncio and amazon SQS
Install / Use
/learn @georgeyk/LoaferREADME
Loafer
|PyPI latest| |PyPI Version| |PyPI License| |Docs|
|CI Build Status| |Coverage Status| |Requirements Status| |Scrutinizer Code Quality| |Code Climate|
Loafer is an asynchronous message dispatcher for concurrent tasks processing.
Currently, only AWS SQS is supported
Features:
- Encourages decoupling from message providers and consumers
- Easy to extend and customize
- Easy error handling, including integration with sentry
- Easy to create one or multiple services
- Generic Handlers
- Amazon SQS integration
It requires Python 3.6+ and is very experimental at the moment, expect a lot of changes until the first major version.
Example
A simple message forwader, from ``source-queue`` to ``destination-queue``:
.. code:: python
from loafer.ext.aws.handlers import SQSHandler
from loafer.ext.aws.routes import SQSRoute
from loafer.managers import LoaferManager
routes = [
SQSRoute('source-queue', handler=SQSHandler('destination-queue')),
]
if __name__ == '__main__':
manager = LoaferManager(routes)
manager.run()
Documentation
Check out the latest Loafer full documentation at Read the Docs_ website.
.. _Read the Docs: http://loafer.readthedocs.org/
.. |Docs| image:: https://readthedocs.org/projects/loafer/badge/?version=latest :target: http://loafer.readthedocs.org/en/latest/?badge=latest .. |CI Build Status| image:: https://circleci.com/gh/georgeyk/loafer.svg?style=svg :target: https://circleci.com/gh/georgeyk/loafer .. |Coverage Status| image:: https://codecov.io/gh/georgeyk/loafer/branch/master/graph/badge.svg :target: https://codecov.io/gh/georgeyk/loafer .. |Requirements Status| image:: https://requires.io/github/georgeyk/loafer/requirements.svg?branch=master :target: https://requires.io/github/georgeyk/loafer/requirements/?branch=master .. |Scrutinizer Code Quality| image:: https://scrutinizer-ci.com/g/georgeyk/loafer/badges/quality-score.png?b=master :target: https://scrutinizer-ci.com/g/georgeyk/loafer/?branch=master .. |Code Climate| image:: https://codeclimate.com/github/georgeyk/loafer/badges/gpa.svg :target: https://codeclimate.com/github/georgeyk/loafer .. |PyPI Version| image:: https://img.shields.io/pypi/pyversions/loafer.svg?maxAge=2592000 :target: https://pypi.python.org/pypi/loafer .. |PyPI License| image:: https://img.shields.io/pypi/l/loafer.svg?maxAge=2592000 :target: https://pypi.python.org/pypi/loafer .. |PyPI latest| image:: https://img.shields.io/pypi/v/loafer.svg?maxAge=2592000 :target: https://pypi.python.org/pypi/loafer
Related Skills
node-connect
351.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
