Skip to main content

Kombu Tramsport for Sakura Cloud SimpleMQ

Project description

Kombu Tramsport for Sakura Cloud SimpleMQ

Install

pip install kombu-sakura-simplemq

Quick overview

from kombu import transport, Connection, Queue

transport.TRANSPORT_ALIASES["sakura-simplemq"] = "kombu_sakura_simplemq.transport:Transport"

with Connection("sakura-simplemq://:{}@".format("YOUR_SIMPLEMQ_API_KEY")) as conn:
    queue_name = "somequeue"
    queue = Queue(queue_name)
    queue.maybe_bind(conn)
    queue.declare()

    # メッセージ送信
    producer = conn.Producer()
    producer.publish(
        body="Hello, custom Transport!",
        routing_key=queue_name,
    )

    def handle_message(body, message):
        print(f"Received message: {body}")
        message.ack()

    # メッセージ受信
    with conn.Consumer(queue, callbacks=[handle_message]):
        while True:
            conn.drain_events(timeout=2)

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

kombu_sakura_simplemq-0.2.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kombu_sakura_simplemq-0.2.0-py2.py3-none-any.whl (4.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file kombu_sakura_simplemq-0.2.0.tar.gz.

File metadata

  • Download URL: kombu_sakura_simplemq-0.2.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for kombu_sakura_simplemq-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2cb66ba7a52c17e29c6a0fc6c493d70505968d125de13a48eb72a37f712459e4
MD5 80327a2573fd374b9bbdff38f9852ba4
BLAKE2b-256 ddbea964dc3c15b3e4700dc959ec36fc8e7161ef55efff4b61a536d95481ae3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for kombu_sakura_simplemq-0.2.0.tar.gz:

Publisher: release.yml on chibiegg/kombu-sakura-simplemq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kombu_sakura_simplemq-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for kombu_sakura_simplemq-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 890735ac67258472def07da288316770c960f56dc3c5b628d02a71530d633d1f
MD5 0192295940dc6085409a6c21309000c5
BLAKE2b-256 ec53f2754a2104d36863ee47401838dd54a14e5f3273569731e233d73d1a5d43

See more details on using hashes here.

Provenance

The following attestation bundles were made for kombu_sakura_simplemq-0.2.0-py2.py3-none-any.whl:

Publisher: release.yml on chibiegg/kombu-sakura-simplemq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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