swarmauri_billing_mock 0.11.0.dev2__py3-none-any.whl

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.
@@ -0,0 +1,5 @@
1
+ """Mock billing provider implementation."""
2
+
3
+ from .provider import MockBillingProvider
4
+
5
+ __all__ = ["MockBillingProvider"]
@@ -0,0 +1,341 @@
1
+ """Mock billing provider used in tests and examples."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Any, Mapping, Optional, Sequence
6
+ from uuid import uuid4
7
+
8
+ from swarmauri_base.billing import (
9
+ BalanceTransfersMixin,
10
+ BillingProviderBase,
11
+ CustomersMixin,
12
+ HostedCheckoutMixin,
13
+ InvoicingMixin,
14
+ MarketplaceMixin,
15
+ OnlinePaymentsMixin,
16
+ PaymentMethodsMixin,
17
+ PayoutsMixin,
18
+ ProductsPricesMixin,
19
+ PromotionsMixin,
20
+ RefundsMixin,
21
+ ReportsMixin,
22
+ RiskMixin,
23
+ SubscriptionsMixin,
24
+ WebhooksMixin,
25
+ )
26
+ from swarmauri_core.billing import ALL_CAPABILITIES
27
+
28
+
29
+ class MockBillingProvider(
30
+ ProductsPricesMixin,
31
+ HostedCheckoutMixin,
32
+ OnlinePaymentsMixin,
33
+ SubscriptionsMixin,
34
+ InvoicingMixin,
35
+ MarketplaceMixin,
36
+ RiskMixin,
37
+ RefundsMixin,
38
+ CustomersMixin,
39
+ PaymentMethodsMixin,
40
+ PayoutsMixin,
41
+ BalanceTransfersMixin,
42
+ ReportsMixin,
43
+ WebhooksMixin,
44
+ PromotionsMixin,
45
+ BillingProviderBase,
46
+ ):
47
+ """Deterministic mock provider suitable for unit tests."""
48
+
49
+ CAPABILITIES = ALL_CAPABILITIES
50
+
51
+ def _stub(self, action: str, **payload: Any) -> Mapping[str, Any]:
52
+ return {
53
+ "id": f"mock_{action}_{uuid4().hex[:10]}",
54
+ "provider": "mock",
55
+ "action": action,
56
+ "payload": payload,
57
+ }
58
+
59
+ # Implement methods similarly to Adyen but with mock names
60
+ # -----------------
61
+ def _create_product(
62
+ self, product_spec: Any, *, idempotency_key: str
63
+ ) -> Mapping[str, Any]:
64
+ result = {
65
+ "id": f"mock_prod_{uuid4().hex[:6]}",
66
+ "provider": "mock",
67
+ "raw": self._stub("product"),
68
+ }
69
+ return result
70
+
71
+ def _create_price(
72
+ self,
73
+ product: Any,
74
+ price_spec: Any,
75
+ *,
76
+ idempotency_key: str,
77
+ ) -> Mapping[str, Any]:
78
+ result = {
79
+ "id": f"mock_price_{uuid4().hex[:6]}",
80
+ "product_id": getattr(product, "id", ""),
81
+ "provider": "mock",
82
+ "raw": self._stub("price"),
83
+ }
84
+ return result
85
+
86
+ def _create_checkout(self, price: Any, request: Any) -> Mapping[str, Any]:
87
+ result = {
88
+ "id": f"mock_chk_{uuid4().hex[:8]}",
89
+ "url": "https://mock.example/checkout",
90
+ "provider": "mock",
91
+ "raw": self._stub("checkout"),
92
+ }
93
+ return result
94
+
95
+ def _create_payment_intent(self, req: Any) -> Mapping[str, Any]:
96
+ result = {
97
+ "id": f"mock_pi_{uuid4().hex[:8]}",
98
+ "status": "requires_confirmation",
99
+ "provider": "mock",
100
+ "raw": self._stub("payment_intent"),
101
+ }
102
+ return result
103
+
104
+ def _capture_payment(
105
+ self, payment_id: str, *, idempotency_key: Optional[str] = None
106
+ ) -> Mapping[str, Any]:
107
+ result = {
108
+ "id": payment_id,
109
+ "status": "succeeded",
110
+ "provider": "mock",
111
+ "raw": self._stub("capture"),
112
+ }
113
+ return result
114
+
115
+ def _cancel_payment(
116
+ self,
117
+ payment_id: str,
118
+ *,
119
+ reason: Optional[str] = None,
120
+ idempotency_key: Optional[str] = None,
121
+ ) -> Mapping[str, Any]:
122
+ result = {
123
+ "id": payment_id,
124
+ "status": "canceled",
125
+ "provider": "mock",
126
+ "raw": self._stub("cancel"),
127
+ }
128
+ return result
129
+
130
+ def _create_subscription(
131
+ self, spec: Any, *, idempotency_key: str
132
+ ) -> Mapping[str, Any]:
133
+ result = {
134
+ "subscription_id": f"mock_sub_{uuid4().hex[:6]}",
135
+ "status": "active",
136
+ "provider": "mock",
137
+ "raw": self._stub("subscription"),
138
+ }
139
+ return result
140
+
141
+ def _cancel_subscription(
142
+ self, subscription_id: str, *, at_period_end: bool = True
143
+ ) -> Mapping[str, Any]:
144
+ result = {
145
+ "subscription_id": subscription_id,
146
+ "status": "canceled",
147
+ "provider": "mock",
148
+ "raw": self._stub("subscription_cancel"),
149
+ }
150
+ return result
151
+
152
+ def _create_invoice(
153
+ self, spec: Any, *, idempotency_key: str
154
+ ) -> Mapping[str, Any]:
155
+ result = {
156
+ "invoice_id": f"mock_inv_{uuid4().hex[:6]}",
157
+ "status": "draft",
158
+ "provider": "mock",
159
+ "raw": self._stub("invoice"),
160
+ }
161
+ return result
162
+
163
+ def _finalize_invoice(self, invoice_id: str) -> Mapping[str, Any]:
164
+ result = {
165
+ "invoice_id": invoice_id,
166
+ "status": "finalized",
167
+ "provider": "mock",
168
+ "raw": self._stub("invoice_finalize"),
169
+ }
170
+ return result
171
+
172
+ def _void_invoice(self, invoice_id: str) -> Mapping[str, Any]:
173
+ result = {
174
+ "invoice_id": invoice_id,
175
+ "status": "void",
176
+ "provider": "mock",
177
+ "raw": self._stub("invoice_void"),
178
+ }
179
+ return result
180
+
181
+ def _mark_uncollectible(self, invoice_id: str) -> Mapping[str, Any]:
182
+ result = {
183
+ "invoice_id": invoice_id,
184
+ "status": "uncollectible",
185
+ "provider": "mock",
186
+ "raw": self._stub("invoice_uncollectible"),
187
+ }
188
+ return result
189
+
190
+ def _create_split(
191
+ self, spec: Any, *, idempotency_key: str
192
+ ) -> Mapping[str, Any]:
193
+ result = {"split": self._stub("split"), "provider": "mock"}
194
+ return result
195
+
196
+ def _charge_with_split(
197
+ self,
198
+ amount_minor: int,
199
+ currency: str,
200
+ *,
201
+ split_code_or_params: Mapping[str, Any],
202
+ idempotency_key: str,
203
+ ) -> Mapping[str, Any]:
204
+ result = {
205
+ "payment_id": f"mock_pay_{uuid4().hex[:6]}",
206
+ "status": "processing",
207
+ "provider": "mock",
208
+ "raw": self._stub("charge_split"),
209
+ }
210
+ return result
211
+
212
+ def _verify_webhook_signature(
213
+ self, raw_body: bytes, headers: Mapping[str, str], secret: str
214
+ ) -> bool:
215
+ return True
216
+
217
+ def _list_disputes(
218
+ self, *, limit: int = 50
219
+ ) -> Sequence[Mapping[str, Any]]:
220
+ disputes = [
221
+ {"id": "mock_dispute_1", "provider": "mock", "status": "won"}
222
+ ]
223
+ return disputes
224
+
225
+ def _create_refund(
226
+ self, payment: Any, req: Any, *, idempotency_key: str
227
+ ) -> Mapping[str, Any]:
228
+ result = self._stub("refund_create")
229
+ return result
230
+
231
+ def _get_refund(self, refund_id: str) -> Mapping[str, Any]:
232
+ result = self._stub("refund_get", refund_id=refund_id)
233
+ return result
234
+
235
+ def _create_customer(
236
+ self, spec: Any, *, idempotency_key: str
237
+ ) -> Mapping[str, Any]:
238
+ result = {
239
+ "id": f"mock_cus_{uuid4().hex[:6]}",
240
+ "provider": "mock",
241
+ "raw": self._stub("customer"),
242
+ }
243
+ return result
244
+
245
+ def _get_customer(self, customer_id: str) -> Mapping[str, Any]:
246
+ result = {
247
+ "id": customer_id,
248
+ "provider": "mock",
249
+ "raw": self._stub("customer_get"),
250
+ }
251
+ return result
252
+
253
+ def _attach_payment_method_to_customer(
254
+ self, customer: Any, pm: Any
255
+ ) -> Mapping[str, Any]:
256
+ result = self._stub("customer_attach_pm")
257
+ return result
258
+
259
+ def _create_payment_method(
260
+ self, spec: Any, *, idempotency_key: str
261
+ ) -> Mapping[str, Any]:
262
+ result = {
263
+ "id": f"mock_pm_{uuid4().hex[:6]}",
264
+ "provider": "mock",
265
+ "raw": self._stub("payment_method"),
266
+ }
267
+ return result
268
+
269
+ def _detach_payment_method(
270
+ self, payment_method_id: str
271
+ ) -> Mapping[str, Any]:
272
+ result = self._stub("payment_method_detach")
273
+ return result
274
+
275
+ def _list_payment_methods(
276
+ self,
277
+ customer: Any,
278
+ *,
279
+ type: Optional[str] = None,
280
+ limit: int = 10,
281
+ ) -> Sequence[Mapping[str, Any]]:
282
+ methods = [
283
+ {
284
+ "id": "mock_pm_1",
285
+ "provider": "mock",
286
+ "raw": self._stub("payment_method"),
287
+ }
288
+ ]
289
+ return methods
290
+
291
+ def _create_payout(
292
+ self, req: Any, *, idempotency_key: str
293
+ ) -> Mapping[str, Any]:
294
+ result = self._stub("payout", idempotency_key=idempotency_key)
295
+ return result
296
+
297
+ def _get_balance(self) -> Mapping[str, Any]:
298
+ result = {
299
+ "snapshot_id": f"mock_bal_{uuid4().hex[:6]}",
300
+ "provider": "mock",
301
+ "raw": self._stub("balance"),
302
+ }
303
+ return result
304
+
305
+ def _create_transfer(
306
+ self, req: Any, *, idempotency_key: str
307
+ ) -> Mapping[str, Any]:
308
+ result = self._stub("transfer", idempotency_key=idempotency_key)
309
+ return result
310
+
311
+ def _create_report(
312
+ self, req: Any, *, idempotency_key: str
313
+ ) -> Mapping[str, Any]:
314
+ result = self._stub("report", idempotency_key=idempotency_key)
315
+ return result
316
+
317
+ def _parse_event(
318
+ self, raw_body: bytes, headers: Mapping[str, str]
319
+ ) -> Mapping[str, Any]:
320
+ result = {
321
+ "event_id": "mock_evt_1",
322
+ "provider": "mock",
323
+ "type": "test.event",
324
+ "raw": self._stub("event"),
325
+ }
326
+ return result
327
+
328
+ def _create_coupon(
329
+ self, spec: Any, *, idempotency_key: str
330
+ ) -> Mapping[str, Any]:
331
+ result = self._stub("coupon", idempotency_key=idempotency_key)
332
+ return result
333
+
334
+ def _create_promotion(
335
+ self, spec: Any, *, idempotency_key: str
336
+ ) -> Mapping[str, Any]:
337
+ result = self._stub("promotion", idempotency_key=idempotency_key)
338
+ return result
339
+
340
+
341
+ __all__ = ["MockBillingProvider"]
@@ -0,0 +1,141 @@
1
+ Metadata-Version: 2.4
2
+ Name: swarmauri_billing_mock
3
+ Version: 0.11.0.dev2
4
+ Summary: Deterministic in-memory Swarmauri billing provider for testing, examples, and full billing capability contract checks.
5
+ License-Expression: Apache-2.0
6
+ License-File: LICENSE
7
+ Keywords: swarmauri,sdk,billing,mock,mock billing provider,in-memory billing,standards,payments,sandbox,testing,contract testing,subscription management,checkout testing,refund testing,provider simulation
8
+ Author: Jacob Stewart
9
+ Author-email: jacob@swarmauri.com
10
+ Requires-Python: >=3.10,<3.15
11
+ Classifier: Development Status :: 1 - Planning
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Information Technology
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Topic :: Internet :: WWW/HTTP
17
+ Classifier: Topic :: Software Development :: Testing
18
+ Classifier: Topic :: Office/Business :: Financial :: Point-Of-Sale
19
+ Classifier: Topic :: Software Development :: Libraries
20
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Programming Language :: Python
23
+ Classifier: Programming Language :: Python :: 3
24
+ Classifier: Programming Language :: Python :: 3 :: Only
25
+ Classifier: Programming Language :: Python :: 3.10
26
+ Classifier: Programming Language :: Python :: 3.11
27
+ Classifier: Programming Language :: Python :: 3.12
28
+ Classifier: Programming Language :: Python :: 3.13
29
+ Classifier: Programming Language :: Python :: 3.14
30
+ Requires-Dist: swarmauri_base
31
+ Requires-Dist: swarmauri_core
32
+ Description-Content-Type: text/markdown
33
+
34
+ ![Swarmauri Logo](https://raw.githubusercontent.com/swarmauri/swarmauri-sdk/master/assets/swarmauri_sdk_brand.png)
35
+
36
+ <p align="center">
37
+ <a href="https://pepy.tech/project/swarmauri_billing_mock/">
38
+ <img src="https://static.pepy.tech/badge/swarmauri_billing_mock/month" alt="PyPI - Downloads"/></a>
39
+ <a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_billing_mock/">
40
+ <img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_billing_mock.svg"/></a>
41
+ <a href="https://pypi.org/project/swarmauri_billing_mock/">
42
+ <img src="https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue" alt="PyPI - Python Version"/></a>
43
+ <a href="https://pypi.org/project/swarmauri_billing_mock/">
44
+ <img src="https://img.shields.io/pypi/l/swarmauri_billing_mock" alt="PyPI - License"/></a>
45
+ <a href="https://pypi.org/project/swarmauri_billing_mock/">
46
+ <img src="https://img.shields.io/pypi/v/swarmauri_billing_mock?label=swarmauri_billing_mock&color=green" alt="PyPI - swarmauri_billing_mock"/></a>
47
+ <a href="https://discord.gg/N4UpBuQv8T">
48
+ <img src="https://img.shields.io/badge/Discord-Join%20Chat-5865F2?logo=discord&logoColor=white" alt="Discord"/></a></p>
49
+
50
+ # Swarmauri Billing Mock
51
+
52
+ `swarmauri_billing_mock` provides a deterministic in-memory billing provider for Swarmauri test suites, examples, and provider contract checks. It implements the full Swarmauri billing surface without network calls so applications can exercise products, prices, checkout, payments, subscriptions, invoices, refunds, customers, payment methods, payouts, transfers, reports, webhooks, coupons, and promotions through one predictable provider.
53
+
54
+ ## Why Swarmauri Billing Mock?
55
+
56
+ Use this package when billing code needs repeatable behavior without a real payment processor. It is useful for unit tests, documentation examples, local development, and compatibility checks for code that targets `BillingProviderBase` and the Swarmauri billing mixins.
57
+
58
+ ## FAQ
59
+
60
+ ### Q: Does this package call a live billing API?
61
+
62
+ A: No. The mock provider is intentionally local and deterministic. It returns Swarmauri-shaped billing payloads and never reaches external payment networks.
63
+
64
+ ### Q: Which billing capabilities does it advertise?
65
+
66
+ A: It advertises every Swarmauri billing capability through `ALL_CAPABILITIES`, including checkout, online payments, subscriptions, invoices, marketplace splits, refunds, customers, payment methods, payouts, balance transfers, reports, webhooks, coupons, and promotions.
67
+
68
+ ### Q: When should I use it instead of a real provider?
69
+
70
+ A: Use it in tests, examples, local workflows, and provider-neutral integration checks. Use Stripe, PayPal, Square, Braintree, Adyen, Authorize.Net, Paystack, or Razorpay packages when code needs a live provider API.
71
+
72
+ ## Features
73
+
74
+ - Implements all billing mixins with predictable outputs.
75
+ - Provides fast billing feedback without network calls.
76
+ - Supports tests that need all Swarmauri billing capabilities available.
77
+ - Demonstrates how to subclass `BillingProviderBase` for custom billing flows.
78
+ - Supports Python 3.10, 3.11, 3.12, 3.13, and 3.14.
79
+
80
+ ## Installation
81
+
82
+ Install with `uv`:
83
+
84
+ ```bash
85
+ uv add swarmauri_billing_mock
86
+ ```
87
+
88
+ Install with `pip`:
89
+
90
+ ```bash
91
+ pip install swarmauri_billing_mock
92
+ ```
93
+
94
+ ## Usage
95
+
96
+ ```python
97
+ from swarmauri_billing_mock import MockBillingProvider
98
+ from swarmauri_base.billing import ProductSpec
99
+
100
+ provider = MockBillingProvider(api_key="mock-key")
101
+ product = provider.create_product(
102
+ ProductSpec(payload={"name": "Test"}),
103
+ idempotency_key="mock-prod-1",
104
+ )
105
+
106
+ print(product.raw)
107
+ ```
108
+
109
+ ## Capability Mapping
110
+
111
+ The mock provider advertises every `Capability` and therefore maps to the entire set of `tigrbl_billing` capabilities when using `capabilities_to_tigrbl`.
112
+
113
+ ## Related Packages
114
+
115
+ Billing provider packages:
116
+
117
+ - [swarmauri_billing_adyen](https://pypi.org/project/swarmauri_billing_adyen/)
118
+ - [swarmauri_billing_authorize_net](https://pypi.org/project/swarmauri_billing_authorize_net/)
119
+ - [swarmauri_billing_braintree](https://pypi.org/project/swarmauri_billing_braintree/)
120
+ - [swarmauri_billing_paypal](https://pypi.org/project/swarmauri_billing_paypal/)
121
+ - [swarmauri_billing_paystack](https://pypi.org/project/swarmauri_billing_paystack/)
122
+ - [swarmauri_billing_razorpay](https://pypi.org/project/swarmauri_billing_razorpay/)
123
+ - [swarmauri_billing_square](https://pypi.org/project/swarmauri_billing_square/)
124
+ - [swarmauri_billing_stripe](https://pypi.org/project/swarmauri_billing_stripe/)
125
+
126
+ Foundational packages:
127
+
128
+ - [swarmauri_core](https://pypi.org/project/swarmauri_core/) defines billing capabilities and interfaces.
129
+ - [swarmauri_base](https://pypi.org/project/swarmauri_base/) provides billing specs, refs, mixins, and `BillingProviderBase`.
130
+ - [swarmauri](https://pypi.org/project/swarmauri/) provides namespace imports and plugin discovery.
131
+
132
+ ## License
133
+
134
+ Apache-2.0
135
+
136
+ ## Contributing
137
+
138
+ Need additional fixtures? Contributions that expand deterministic behavior are encouraged.
139
+
140
+
141
+
@@ -0,0 +1,7 @@
1
+ swarmauri_billing_mock/__init__.py,sha256=_tUQL3wr1FqWTWXh7sTQ9hwA4m1wxgtPpCXJ2DD4Clo,122
2
+ swarmauri_billing_mock/provider.py,sha256=sH-xy6914_imUvYFaZo_FJ6ecnMudOcaojoO9JLOQ1A,9631
3
+ swarmauri_billing_mock-0.11.0.dev2.dist-info/METADATA,sha256=5hj455XRymfsnPijtwGEL4orqarFRYQZotq-Yqs8oGE,6791
4
+ swarmauri_billing_mock-0.11.0.dev2.dist-info/WHEEL,sha256=eY7nduwzv-ldUxpzbRlxwvC693Hg6PX8bWDjEHjZ_dk,88
5
+ swarmauri_billing_mock-0.11.0.dev2.dist-info/entry_points.txt,sha256=Vi2gbVekwozPK9IW9hs84wszwHSe_uz6JUf6C_opHC4,103
6
+ swarmauri_billing_mock-0.11.0.dev2.dist-info/licenses/LICENSE,sha256=djUXOlCxLVszShEpZXshZ7v33G-2qIC_j9KXpWKZSzQ,11359
7
+ swarmauri_billing_mock-0.11.0.dev2.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 2.4.1
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [swarmauri.billing_providers]
2
+ MockBillingProvider=swarmauri_billing_mock.provider:MockBillingProvider
3
+
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [2025] [Jacob Stewart @ Swarmauri]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.