runtimeconditions-rabbitmq-service 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (17) hide show
  1. runtimeconditions_rabbitmq_service-0.2.0/MANIFEST.in +1 -0
  2. runtimeconditions_rabbitmq_service-0.2.0/PKG-INFO +99 -0
  3. runtimeconditions_rabbitmq_service-0.2.0/README.md +91 -0
  4. runtimeconditions_rabbitmq_service-0.2.0/pyproject.toml +23 -0
  5. runtimeconditions_rabbitmq_service-0.2.0/runtimeconditions.file-manifest.yaml +13 -0
  6. runtimeconditions_rabbitmq_service-0.2.0/setup.cfg +4 -0
  7. runtimeconditions_rabbitmq_service-0.2.0/src/runtimeconditions_rabbitmq_service/__init__.py +24 -0
  8. runtimeconditions_rabbitmq_service-0.2.0/src/runtimeconditions_rabbitmq_service/bindings.py +153 -0
  9. runtimeconditions_rabbitmq_service-0.2.0/src/runtimeconditions_rabbitmq_service/py.typed +0 -0
  10. runtimeconditions_rabbitmq_service-0.2.0/src/runtimeconditions_rabbitmq_service/runtimeconditions.binding-model.yaml +692 -0
  11. runtimeconditions_rabbitmq_service-0.2.0/src/runtimeconditions_rabbitmq_service/runtimeconditions.binding-release.yaml +39 -0
  12. runtimeconditions_rabbitmq_service-0.2.0/src/runtimeconditions_rabbitmq_service/runtimeconditions.bindings.yaml +176 -0
  13. runtimeconditions_rabbitmq_service-0.2.0/src/runtimeconditions_rabbitmq_service/runtimeconditions.extension.yaml +154 -0
  14. runtimeconditions_rabbitmq_service-0.2.0/src/runtimeconditions_rabbitmq_service.egg-info/PKG-INFO +99 -0
  15. runtimeconditions_rabbitmq_service-0.2.0/src/runtimeconditions_rabbitmq_service.egg-info/SOURCES.txt +15 -0
  16. runtimeconditions_rabbitmq_service-0.2.0/src/runtimeconditions_rabbitmq_service.egg-info/dependency_links.txt +1 -0
  17. runtimeconditions_rabbitmq_service-0.2.0/src/runtimeconditions_rabbitmq_service.egg-info/top_level.txt +1 -0
@@ -0,0 +1 @@
1
+ include runtimeconditions.file-manifest.yaml
@@ -0,0 +1,99 @@
1
+ Metadata-Version: 2.4
2
+ Name: runtimeconditions-rabbitmq-service
3
+ Version: 0.2.0
4
+ Summary: Use this extension when your workload sends or receives messages with RabbitMQ.
5
+ Project-URL: Repository, https://github.com/runtimeconditions/extensions
6
+ Requires-Python: >=3.12
7
+ Description-Content-Type: text/markdown
8
+
9
+ <!-- Code generated by runtimeconditions-binding-emitter 0.1.0 from model 0597c7cca9e3537705040fd3af4ea00e911a40e0445ffd5a7a775426ed8d96e9; DO NOT EDIT. -->
10
+
11
+ # runtimeconditions-rabbitmq-service
12
+
13
+ Use this extension when your workload sends or receives messages with RabbitMQ.
14
+
15
+ In RabbitMQ, a workload sends a message to an exchange, together with a routing key. The exchange uses
16
+ the routing key to put the message into one or more queues. Other workloads then read the messages from
17
+ those queues. Exchanges and queues live inside a virtual host, which is like a separate space on the
18
+ RabbitMQ server.
19
+
20
+ In a Condition, you give the virtual host, and you list every exchange that your workload sends to and
21
+ every queue that it reads from. The platform then creates them or gives your workload access to them.
22
+
23
+ Write the exact names. Patterns are not allowed.
24
+
25
+ ```sh
26
+ pip install runtimeconditions-rabbitmq-service
27
+ ```
28
+
29
+ Runtime Conditions extension: https://runtimeconditions.io/extensions/rabbitmq/service/0.2.0/runtimeconditions.extension.yaml
30
+
31
+ ## Conditions
32
+
33
+ Every Condition part this package defines, with the fields you can set. Select a line to open it.
34
+
35
+ <details>
36
+ <summary><b>rabbitmq.service</b> · <code>amqp_0_9_1</code>: Your workload connects to RabbitMQ with a normal AMQP 0-9-1 client library, the protocol that most RabbitMQ clients use.</summary>
37
+
38
+ `Amqp091` is the `interface` of a `rabbitmq.service` Condition.
39
+
40
+ | Field | Type | Required | Description |
41
+ | --- | --- | --- | --- |
42
+ | `operations` | `Operations` | yes | The exchanges that your workload sends to and the queues that it reads from. Each line names one of them. The exchanges and queues in this virtual host that your workload uses. List at least one, and do not repeat a line. |
43
+ | `operations[].action` | `Action` | yes | What the workload does with it.<br>Values:<br>`consume`: Read messages from a queue.<br>`publish`: Send messages to an exchange, with the routing key given in the same line. |
44
+ | `operations[].resource` | `Resource` | yes | What the line is about, an exchange or a queue.<br>Values:<br>`exchange`: An exchange, which receives the messages that your workload sends.<br>`queue`: A queue, which holds the messages that your workload reads. |
45
+ | `operations[].exchange` | `str \| None` | no | The exact name of the exchange. Write an empty string for the default exchange. |
46
+ | `operations[].queue` | `str \| None` | no | The exact name of the queue that the workload reads from. |
47
+ | `operations[].routing_key` | `str \| None` | no | The exact routing key that the workload sends with each message. It can be empty. |
48
+ | `virtual_host` | `str` | yes | The exact name of the virtual host. Every exchange and queue in this Condition is inside it. The exact name of the virtual host. Write / for the default virtual host. |
49
+
50
+ </details>
51
+
52
+ ## rabbitmq_service
53
+
54
+ `rabbitmq_service` declares a `rabbitmq.service` Condition.
55
+
56
+ Your workload needs a RabbitMQ server with the exchanges and queues listed in the Condition.
57
+
58
+ Example: a workload that sends an event to the order-events exchange, with the routing key
59
+ orders.created, each time someone places an order.
60
+
61
+ ```python
62
+ from runtimeconditions_rabbitmq_service import (
63
+ Action,
64
+ Amqp091,
65
+ OperationsItem,
66
+ Resource,
67
+ rabbitmq_service,
68
+ )
69
+
70
+ rabbitmq_service(
71
+ Amqp091(
72
+ operations=[
73
+ OperationsItem(
74
+ action=Action.PUBLISH,
75
+ resource=Resource.EXCHANGE,
76
+ exchange="order-events",
77
+ routing_key="orders.created",
78
+ ),
79
+ ],
80
+ virtual_host="/orders",
81
+ ),
82
+ )
83
+ ```
84
+
85
+ In a Profile, this declares:
86
+
87
+ ```yaml
88
+ kind: rabbitmq.service
89
+ interface:
90
+ type: amqp_0_9_1
91
+ virtualHost: /orders
92
+ operations:
93
+ - resource: exchange
94
+ action: publish
95
+ exchange: order-events
96
+ routingKey: orders.created
97
+ ```
98
+
99
+ Every class, field and enum member is documented in the package's docstrings.
@@ -0,0 +1,91 @@
1
+ <!-- Code generated by runtimeconditions-binding-emitter 0.1.0 from model 0597c7cca9e3537705040fd3af4ea00e911a40e0445ffd5a7a775426ed8d96e9; DO NOT EDIT. -->
2
+
3
+ # runtimeconditions-rabbitmq-service
4
+
5
+ Use this extension when your workload sends or receives messages with RabbitMQ.
6
+
7
+ In RabbitMQ, a workload sends a message to an exchange, together with a routing key. The exchange uses
8
+ the routing key to put the message into one or more queues. Other workloads then read the messages from
9
+ those queues. Exchanges and queues live inside a virtual host, which is like a separate space on the
10
+ RabbitMQ server.
11
+
12
+ In a Condition, you give the virtual host, and you list every exchange that your workload sends to and
13
+ every queue that it reads from. The platform then creates them or gives your workload access to them.
14
+
15
+ Write the exact names. Patterns are not allowed.
16
+
17
+ ```sh
18
+ pip install runtimeconditions-rabbitmq-service
19
+ ```
20
+
21
+ Runtime Conditions extension: https://runtimeconditions.io/extensions/rabbitmq/service/0.2.0/runtimeconditions.extension.yaml
22
+
23
+ ## Conditions
24
+
25
+ Every Condition part this package defines, with the fields you can set. Select a line to open it.
26
+
27
+ <details>
28
+ <summary><b>rabbitmq.service</b> · <code>amqp_0_9_1</code>: Your workload connects to RabbitMQ with a normal AMQP 0-9-1 client library, the protocol that most RabbitMQ clients use.</summary>
29
+
30
+ `Amqp091` is the `interface` of a `rabbitmq.service` Condition.
31
+
32
+ | Field | Type | Required | Description |
33
+ | --- | --- | --- | --- |
34
+ | `operations` | `Operations` | yes | The exchanges that your workload sends to and the queues that it reads from. Each line names one of them. The exchanges and queues in this virtual host that your workload uses. List at least one, and do not repeat a line. |
35
+ | `operations[].action` | `Action` | yes | What the workload does with it.<br>Values:<br>`consume`: Read messages from a queue.<br>`publish`: Send messages to an exchange, with the routing key given in the same line. |
36
+ | `operations[].resource` | `Resource` | yes | What the line is about, an exchange or a queue.<br>Values:<br>`exchange`: An exchange, which receives the messages that your workload sends.<br>`queue`: A queue, which holds the messages that your workload reads. |
37
+ | `operations[].exchange` | `str \| None` | no | The exact name of the exchange. Write an empty string for the default exchange. |
38
+ | `operations[].queue` | `str \| None` | no | The exact name of the queue that the workload reads from. |
39
+ | `operations[].routing_key` | `str \| None` | no | The exact routing key that the workload sends with each message. It can be empty. |
40
+ | `virtual_host` | `str` | yes | The exact name of the virtual host. Every exchange and queue in this Condition is inside it. The exact name of the virtual host. Write / for the default virtual host. |
41
+
42
+ </details>
43
+
44
+ ## rabbitmq_service
45
+
46
+ `rabbitmq_service` declares a `rabbitmq.service` Condition.
47
+
48
+ Your workload needs a RabbitMQ server with the exchanges and queues listed in the Condition.
49
+
50
+ Example: a workload that sends an event to the order-events exchange, with the routing key
51
+ orders.created, each time someone places an order.
52
+
53
+ ```python
54
+ from runtimeconditions_rabbitmq_service import (
55
+ Action,
56
+ Amqp091,
57
+ OperationsItem,
58
+ Resource,
59
+ rabbitmq_service,
60
+ )
61
+
62
+ rabbitmq_service(
63
+ Amqp091(
64
+ operations=[
65
+ OperationsItem(
66
+ action=Action.PUBLISH,
67
+ resource=Resource.EXCHANGE,
68
+ exchange="order-events",
69
+ routing_key="orders.created",
70
+ ),
71
+ ],
72
+ virtual_host="/orders",
73
+ ),
74
+ )
75
+ ```
76
+
77
+ In a Profile, this declares:
78
+
79
+ ```yaml
80
+ kind: rabbitmq.service
81
+ interface:
82
+ type: amqp_0_9_1
83
+ virtualHost: /orders
84
+ operations:
85
+ - resource: exchange
86
+ action: publish
87
+ exchange: order-events
88
+ routingKey: orders.created
89
+ ```
90
+
91
+ Every class, field and enum member is documented in the package's docstrings.
@@ -0,0 +1,23 @@
1
+ # Code generated by runtimeconditions-binding-emitter 0.1.0 from model 0597c7cca9e3537705040fd3af4ea00e911a40e0445ffd5a7a775426ed8d96e9; DO NOT EDIT.
2
+ [build-system]
3
+ requires = ["setuptools==84.0.0"]
4
+ build-backend = "setuptools.build_meta"
5
+
6
+ [project]
7
+ name = "runtimeconditions-rabbitmq-service"
8
+ version = "0.2.0"
9
+ requires-python = ">=3.12"
10
+ description = "Use this extension when your workload sends or receives messages with RabbitMQ."
11
+ readme = "README.md"
12
+ dependencies = [
13
+ ]
14
+
15
+ [project.urls]
16
+ Repository = "https://github.com/runtimeconditions/extensions"
17
+
18
+ [tool.setuptools.packages.find]
19
+ where = ["src"]
20
+ include = ["runtimeconditions_rabbitmq_service", "runtimeconditions_rabbitmq_service.*"]
21
+
22
+ [tool.setuptools.package-data]
23
+ "runtimeconditions_rabbitmq_service" = ["py.typed", "runtimeconditions.bindings.yaml", "runtimeconditions.binding-model.yaml", "runtimeconditions.extension.yaml", "runtimeconditions.binding-release.yaml"]
@@ -0,0 +1,13 @@
1
+ apiVersion: runtimeconditions.io/file-manifest/v1alpha1
2
+ kind: RuntimeConditionsFileManifest
3
+ files:
4
+ MANIFEST.in: d51e89c4c7c5e16c06d543c7aac32df945dd4f536e578b6ad089b68a6f489fca
5
+ README.md: 49d1c6276e47a3af9db2585d4434f0fd665e711b907d2a9227db3b88544e7c46
6
+ pyproject.toml: d3d7ae5753e9eac983c94985fb52aa8f7a3192c3dfc038cb2f783c626ec6fd1a
7
+ src/runtimeconditions_rabbitmq_service/__init__.py: 5d057bbaec41d6224c0c67635476642ce9d2be5a35603647e224ba50eb3915ff
8
+ src/runtimeconditions_rabbitmq_service/bindings.py: 1e58d19a53c31376f28d2ffcde6753a987edadff65c91aa8e7c3c516dd9d3529
9
+ src/runtimeconditions_rabbitmq_service/py.typed: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
10
+ src/runtimeconditions_rabbitmq_service/runtimeconditions.binding-model.yaml: 9cfbaf3188aabf15076434d2731da1885a26098a2945b581c3b0c441c89c199e
11
+ src/runtimeconditions_rabbitmq_service/runtimeconditions.binding-release.yaml: fdc3abcf0a9dcd9c2cbe77f64ac73edd95f7aab46f742e5939c2d7c952d8bbc4
12
+ src/runtimeconditions_rabbitmq_service/runtimeconditions.bindings.yaml: 2137153b6549308899a7d152fc9ea1ae810bd75423be5f3436017aab686d5001
13
+ src/runtimeconditions_rabbitmq_service/runtimeconditions.extension.yaml: e339f653c2c30f9f61ebd318da692b9487c2ae7afad6540e9d8ba1a9d3e989de
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,24 @@
1
+ # Code generated by runtimeconditions-binding-emitter 0.1.0 from model 0597c7cca9e3537705040fd3af4ea00e911a40e0445ffd5a7a775426ed8d96e9; DO NOT EDIT.
2
+ from __future__ import annotations
3
+
4
+ from .bindings import (
5
+ Action,
6
+ Amqp091,
7
+ Declaration,
8
+ Operations,
9
+ OperationsItem,
10
+ RabbitmqServiceField,
11
+ Resource,
12
+ rabbitmq_service,
13
+ )
14
+
15
+ __all__ = [
16
+ "Action",
17
+ "Amqp091",
18
+ "Declaration",
19
+ "Operations",
20
+ "OperationsItem",
21
+ "RabbitmqServiceField",
22
+ "Resource",
23
+ "rabbitmq_service",
24
+ ]
@@ -0,0 +1,153 @@
1
+ # Code generated by runtimeconditions-binding-emitter 0.1.0 from model 0597c7cca9e3537705040fd3af4ea00e911a40e0445ffd5a7a775426ed8d96e9; DO NOT EDIT.
2
+ """Runtime Conditions defined by
3
+ https://runtimeconditions.io/extensions/rabbitmq/service/0.2.0/runtimeconditions.extension.yaml.
4
+
5
+ Use this extension when your workload sends or receives messages with RabbitMQ.
6
+
7
+ In RabbitMQ, a workload sends a message to an exchange, together with a routing key.
8
+ The exchange uses the routing key to put the message into one or more queues. Other
9
+ workloads then read the messages from those queues. Exchanges and queues live inside
10
+ a virtual host, which is like a separate space on the RabbitMQ server.
11
+
12
+ In a Condition, you give the virtual host, and you list every exchange that your
13
+ workload sends to and every queue that it reads from. The platform then creates them
14
+ or gives your workload access to them.
15
+
16
+ Write the exact names. Patterns are not allowed.
17
+ """
18
+
19
+ from __future__ import annotations
20
+
21
+ from dataclasses import dataclass
22
+ from enum import StrEnum
23
+ from typing import Protocol, Sequence, TypeAlias
24
+
25
+
26
+ @dataclass(frozen=True, kw_only=True)
27
+ class Declaration:
28
+ pass
29
+
30
+
31
+ class RabbitmqServiceField(Protocol):
32
+ def rc_marker_e260202b372e60ef(self) -> None: ...
33
+
34
+
35
+ class Action(StrEnum):
36
+ """What the workload does with it."""
37
+
38
+ CONSUME = "consume"
39
+ """Read messages from a queue."""
40
+ PUBLISH = "publish"
41
+ """Send messages to an exchange, with the routing key given in the same line."""
42
+
43
+
44
+ @dataclass(frozen=True, kw_only=True)
45
+ class Amqp091:
46
+ """Your workload connects to RabbitMQ with a normal AMQP 0-9-1 client library, the
47
+ protocol that most RabbitMQ clients use.
48
+
49
+ Example: a workload that reads messages from the order-emails queue to send
50
+ order emails. The virtual host / is the default one.
51
+
52
+ ```yaml
53
+ kind: rabbitmq.service
54
+ interface:
55
+ type: amqp_0_9_1
56
+ virtualHost: /
57
+ operations:
58
+ - resource: queue
59
+ action: consume
60
+ queue: order-emails
61
+ ```
62
+ """
63
+
64
+ operations: Operations
65
+ """The exchanges that your workload sends to and the queues that it reads from.
66
+ Each line names one of them.
67
+
68
+ The exchanges and queues in this virtual host that your workload uses. List at
69
+ least one, and do not repeat a line.
70
+ """
71
+ virtual_host: str
72
+ """The exact name of the virtual host. Every exchange and queue in this Condition
73
+ is inside it.
74
+
75
+ The exact name of the virtual host. Write / for the default virtual host.
76
+ """
77
+
78
+ def rc_marker_e260202b372e60ef(self) -> None:
79
+ return None
80
+
81
+
82
+ Operations: TypeAlias = "Sequence[OperationsItem]"
83
+ """The exchanges that your workload sends to and the queues that it reads from. Each
84
+ line names one of them.
85
+
86
+ The exchanges and queues in this virtual host that your workload uses. List at least
87
+ one, and do not repeat a line.
88
+ """
89
+
90
+
91
+ @dataclass(frozen=True, kw_only=True)
92
+ class OperationsItem:
93
+ action: Action
94
+ """What the workload does with it."""
95
+ resource: Resource
96
+ """What the line is about, an exchange or a queue."""
97
+ exchange: str | None = None
98
+ """The exact name of the exchange. Write an empty string for the default exchange."""
99
+ queue: str | None = None
100
+ """The exact name of the queue that the workload reads from."""
101
+ routing_key: str | None = None
102
+ """The exact routing key that the workload sends with each message. It can be
103
+ empty.
104
+ """
105
+
106
+
107
+ class Resource(StrEnum):
108
+ """What the line is about, an exchange or a queue."""
109
+
110
+ EXCHANGE = "exchange"
111
+ """An exchange, which receives the messages that your workload sends."""
112
+ QUEUE = "queue"
113
+ """A queue, which holds the messages that your workload reads."""
114
+
115
+
116
+ def rabbitmq_service(*fields: RabbitmqServiceField) -> Declaration:
117
+ """Declare a rabbitmq.service Condition.
118
+
119
+ Your workload needs a RabbitMQ server with the exchanges and queues listed in
120
+ the Condition.
121
+
122
+ Example: a workload that sends an event to the order-events exchange, with the
123
+ routing key orders.created, each time someone places an order.
124
+
125
+ ```python
126
+ rabbitmq_service(
127
+ Amqp091(
128
+ operations=[
129
+ OperationsItem(
130
+ action=Action.PUBLISH,
131
+ resource=Resource.EXCHANGE,
132
+ exchange="order-events",
133
+ routing_key="orders.created",
134
+ ),
135
+ ],
136
+ virtual_host="/orders",
137
+ ),
138
+ )
139
+ ```
140
+ """
141
+ return Declaration()
142
+
143
+
144
+ __all__ = [
145
+ "Action",
146
+ "Amqp091",
147
+ "Declaration",
148
+ "Operations",
149
+ "OperationsItem",
150
+ "RabbitmqServiceField",
151
+ "Resource",
152
+ "rabbitmq_service",
153
+ ]