Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

codecov

talus (noun) - ta·​lus | ˈtā-ləs: a slope formed especially by an accumulation of rock debris; Occasional habitat of the pika.

A wrapper for connecting to RabbitMQ which constrains clients to a single purpose channel (producer or consumer) with healing for intermittent connectivity.

Features

  • Guided separation of connections for producers and consumers

  • Re-establish connections to the server when lost

  • Constrained interface to support simple produce / consume use cases for direct exchanges

Installation

pip install talus

Examples

Creating a message class

from talus.message import message_class

@message_class(routing_key="message.m", queues=["message.q"])
class MyMessage:
    a: str

Consumer with defaults for connection and retry

with DurableBlockingConsumerWrapper(consumer_queue='queue_name') as consumer:
   for method, properties, body in consumer.consume_generator(auto_ack=True):
       pass # DO Something with the message

Consumer specifying connection and retry data

with DurableBlockingConsumerWrapper(consumer_queue='queue_name',
   rabbitmq_host="localhost",
   rabbitmq_port5672,
   rabbitmq_user='guest',
   rabbitmq_pass='guest',
   retry_delay=1,
   retry_backoff=2,
   retry_jitter=(1, 10),
   retry_max_delay=300,
   prefetch_count=1,
   connection_name='consumer connection') as consumer:
   for method, properties, body in consumer.consume_generator(auto_ack=True):
       pass # DO Something with the message

Producer with defaults for connection and retry

with DurableBlockingProducerWrapper(producer_queue_bindings=[{"routing_key": "test.m", "bound_queue": "test.q"}, MyMessage.binding()],
   publish_exchange='amq.direct') as producer:
   producer.post('test.m', {'key': 'value'})
   producer.publish_message(MyMessage(a="s")) # using the message class from an earlier example

Download files

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

Source Distribution

talus-1.0.0rc1.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

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

talus-1.0.0rc1-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file talus-1.0.0rc1.tar.gz.

File metadata

  • Download URL: talus-1.0.0rc1.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.9

File hashes

Hashes for talus-1.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 9ad6148c9d5a64df8a7f3003622b74dbd9efcd6ecf079bf238eed3a44ba8e96a
MD5 371c58e4b13a37caae890a711b4c3c88
BLAKE2b-256 6d019fe3b44ce902dcda940294c96570026287fa7a5741a189a0ee0f13d7622f

See more details on using hashes here.

File details

Details for the file talus-1.0.0rc1-py3-none-any.whl.

File metadata

  • Download URL: talus-1.0.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.9

File hashes

Hashes for talus-1.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 cc009a199c363e1d05174a29da1383014715b829df1fbf5162c0ebfe4fb3cd5f
MD5 fca707869c683607908052a239beea44
BLAKE2b-256 366e9acc5a596b4daed02f7c80bc0d47fc507457169b5a9ecbd803319317634b

See more details on using hashes here.

Release history Release notifications | RSS feed

1.3.4

2 files

1.3.3

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

This release

1.0.0rc1 This release

2 files

0.2.1

1 file

0.2.0

1 file

0.1.9

1 file

0.1.8

1 file

0.1.7

1 file

0.1.6

1 file

0.1.5

1 file

0.1.4

1 file

0.1.2

1 file

0.1.1

1 file

0.1.0

1 file

0.0.2

1 file

0.0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page