Skip to main content

Asynchronous message dispatcher for concurrent tasks processing

Project description

PyPI latest PyPI Version PyPI License Docs

CI Build Status Coverage Status Requirements Status Scrutinizer Code Quality Code Climate

Olist Sponsor


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.7+

Example

A simple message forwader, from source-queue to destination-queue:

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.

Changelog:

3.0.3 (2020-11-05)

  • Supress RuntimeError

3.0.2 (2020-11-04)

  • Fix ProviderRuntimeError

3.0.1 (2020-10-29)

  • Reraise RuntimeError as ProviderRuntimeError

3.0.0 (2020-10-20)

  • Add support for python 3.9

  • Drop support for python 3.5 and 3.6

2.0.0 (2020-07-02)

  • Inicial fork release(test)

2.0.0+post1 (2020-05-26)

  • Use sentry_sdk

1.3.2+post3 (2020-04-27)

  • Improve shut down methods

1.3.2+post2 (2020-04-14)

  • Update aiobotocore client

1.3.2+post1 (2019-04-27)

  • Update dependencies

  • Update makefile for olist build

1.3.2 (2019-04-27)

  • Improve message processing (#48 by @lamenezes)

  • Improve error logging (#39 by @wiliamsouza)

  • Refactor in message dispatcher and event-loop shutdown

  • Minor fixes and improvements

1.3.1 (2017-10-22)

  • Improve performance (#35 by @allisson)

  • Fix requirement versions resolution

  • Minor fixes and improvements

1.3.0 (2017-09-26)

  • Refactor tasks dispatching, it should improve performance

  • Refactor SQSProvider to ignore HTTP 404 errors when deleting messages

  • Minor fixes and improvements

1.2.1 (2017-09-11)

  • Bump boto3 version (by @daneoshiga)

1.2.0 (2017-08-15)

  • Enable provider parameters (boto client options)

1.1.1 (2017-06-14)

  • Bugfix: fix SNS prefix value in use for topic name wildcard (by @lamenezes)

1.1.0 (2017-05-01)

  • Added initial contracsts for class-based handlers

  • Added generic handlers: SQSHandler/SNSHander

  • Improve internal error handling

  • Improve docs

1.0.2 (2017-04-13)

  • Fix sentry error handler integration

1.0.1 (2017-04-09)

  • Add tox and execute tests for py36

  • Update aiohttp/aiobotocore versions

  • Minor fixes and enhancements

1.0.0 (2017-03-27)

  • Major code rewrite

  • Remove CLI

  • Add better support for error handlers, including sentry/raven

  • Refactor exceptions

  • Add message metadata information

  • Update message lifecycle with handler/error handler return value

  • Enable execution of one service iteration (by default, it still runs “forever”)

0.0.3 (2016-04-24)

  • Improve documentation

  • Improve package metadata and dependencies

  • Add loafer.aws.message_translator.SNSMessageTranslator class

  • Fix ImportError exceptions for configuration that uses loafer.utils.import_callable

0.0.2 (2016-04-18)

  • Fix build hardcoding tests dependencies

0.0.1 (2016-04-18)

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

olist-loafer-3.0.3.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

olist_loafer-3.0.3-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file olist-loafer-3.0.3.tar.gz.

File metadata

  • Download URL: olist-loafer-3.0.3.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for olist-loafer-3.0.3.tar.gz
Algorithm Hash digest
SHA256 225b390291f92f09b42c345240a7e0677cacd095bb4715ce2123d7e576d2ac69
MD5 12c5717c7e1418a5b786279b5abfd01e
BLAKE2b-256 4bb8b584c3e9f3bc62ebd706aba52fe1d583440786a3d243f03e537c0daead7e

See more details on using hashes here.

File details

Details for the file olist_loafer-3.0.3-py3-none-any.whl.

File metadata

  • Download URL: olist_loafer-3.0.3-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for olist_loafer-3.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 12583ae15c1ad8ed8a0d72d2b950547eb074fcba70baa6ad5af60e6d4ade9412
MD5 bc78b1e35d54592b9f614259c37d6ca1
BLAKE2b-256 7c53765b8c3c1f71489e2cfe67540d46755a531672b07d2413a3b99767cd6e7c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page