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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file ponponon-0.1.0.tar.gz.

File metadata

  • Download URL: ponponon-0.1.0.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.18

File hashes

Hashes for ponponon-0.1.0.tar.gz
Algorithm Hash digest
SHA256 335014a90dbbbcc50203888422496a5a331272b8d17da102bf76bdd6f705d080
MD5 c8668434685894ed87eb5523cc1f3ef3
BLAKE2b-256 5e154020b845bc32cb91f18b448f40cf9984988542d3f251ec06ae13b31294db

See more details on using hashes here.

File details

Details for the file ponponon-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ponponon-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.18

File hashes

Hashes for ponponon-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ace4b9a71303d121c02c8eeaa44287c2b80523bde43022ca519c4624b5676f6e
MD5 569e77c6e1aed1c32e084f6977523140
BLAKE2b-256 9029680190a460bb1c353cf8470b1d0e297391f6f111ff409a2509db06ef102a

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