Skip to main content

An advanced message queue framework, derived from nameko

Project description

ponponon

Package version downloads
Supported Python versions GitHub

Introduce

ponponon(pon) an advanced message queue framework, derived from nameko

⭐️ 🌟 ✨ ⚡️ ☄️ 💥

Installation

Package is uploaded on PyPI.

You can install it with pip:

pip install ponponon

Requirements

Python -- one of the following:

  • CPython : 3.8 and newer ✅
  • PyPy : Software compatibility not yet tested ❓

Features

  • Support for concurrent processes: eventlet, gevent
  • Support amqp protocol
  • Support for http protocol
  • Support for grpc protocol
  • Support typing hints, like Fastapi

Create it

from typing import Optional
from loguru import logger
from pon.events.entrance import event_handler


class DNACreateService:
    name = 'dna_create_service'

    @event_handler(source_service='ye', event_name='take')
    def auth(self, src_dna: str, content_type: Optional[str] = None) -> None:
        logger.debug(f'src_dna: {src_dna}')

    @event_handler(source_service='ye', event_name='to_decode')
    def decode(self, src_dna: str) -> None:
        logger.debug(f'src_dna: {src_dna}')


class SampleSearchService:
    name = 'sample_search_service'

    @event_handler(source_service='ye', event_name='take')
    def search(self, url: str) -> None:
        logger.debug(f'url: {url}')

Run it

pon run --config config.yaml services

Check it

Resources

License

pon is released under the MIT License. See LICENSE for more information.

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

ponponon-0.1.0.tar.gz (13.9 kB view hashes)

Uploaded Source

Built Distribution

ponponon-0.1.0-py3-none-any.whl (17.6 kB view hashes)

Uploaded Python 3

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