Types

class yapw.types.State(format_routing_key, interrupt, connection, exchange, encode, content_type, delivery_mode)[source]

Attributes that can be used safely in consumer callbacks.

Parameters:
format_routing_key: Callable[[str], str]

A function to format the routing key.

interrupt: Callable[[T], None]

A function to shut down the client.

connection: T

The connection.

exchange: str

The exchange name.

encode: Callable[[Any, str], bytes]

The message bodies’ encoder.

content_type: str

The messages’ content type.

delivery_mode: int

The messages’ delivery mode.

class yapw.types.PublishKeywords[source]

Keyword arguments for basic_publish.

exchange: str

The exchange to publish to.

routing_key: str

The message’s routing key.

body: bytes

The message’s body.

properties: BasicProperties

The message’s content type and delivery mode.