Skip to main content

No project description provided

Project description

RMQ-ROUTER

Rmq-router is python lib for easy integration rabbit consumer with fastapi

Installation

poetry add easy-rmq

Usage

Make sure in .env you declare RABBITMQ_URL=amqp://...

from pub_sub import PubSub

@PubSub.subscribe(queue_name="hello", route_key="hello", exchange_name="hello")
async def hello(message):
    print("Welcome", message)

@asynccontextmanager
async def lifespan(app: FastAPI):
    await hello()
    yield

app = FastAPI(lifespan=lifespan)

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

easy_rmq-0.1.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

easy_rmq-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: easy_rmq-0.1.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Darwin/23.5.0

File hashes

Hashes for easy_rmq-0.1.0.tar.gz
Algorithm Hash digest
SHA256 868304488b0f628c6564b8226407da7ce80a41bbf4fe63a7a9b8c14617ebaa55
MD5 01ef7bc708d3efd74b3b52b7a250ab29
BLAKE2b-256 6594fda38ba7f4baa13c9a80f3ecdf95152b1a50e3b0938acb691b03cf773b07

See more details on using hashes here.

File details

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

File metadata

  • Download URL: easy_rmq-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Darwin/23.5.0

File hashes

Hashes for easy_rmq-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 09b6322d5426b276a8fe1560afaf71899d85f1538c8434003d8374e01427cbed
MD5 98a04db9055b6697a8993a677ac80d48
BLAKE2b-256 d56adf570c16d004f46bb98f7751b954a24e284d04a4673d6be492e98898fa58

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