tba-concrete-capability-default 0.4.0.dev2__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.
@@ -0,0 +1,21 @@
1
+ Metadata-Version: 2.4
2
+ Name: tba-concrete-capability-default
3
+ Version: 0.4.0.dev2
4
+ Summary: Opinionated generic default capability implementation.
5
+ License-Expression: Apache-2.0
6
+ Requires-Python: >=3.10,<3.15
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.10
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Classifier: Programming Language :: Python :: 3.14
13
+ Requires-Dist: tba-concrete-capability (==0.4.0.dev2)
14
+ Requires-Dist: tba-contracts-identity (==0.4.0.dev2)
15
+ Description-Content-Type: text/markdown
16
+
17
+ # tba-concrete-capability-default
18
+
19
+ Layer-10.2 generic capability with an explicit default ready/healthy state.
20
+ Capability identity and operations are still supplied by the author.
21
+
@@ -0,0 +1,4 @@
1
+ # tba-concrete-capability-default
2
+
3
+ Layer-10.2 generic capability with an explicit default ready/healthy state.
4
+ Capability identity and operations are still supplied by the author.
@@ -0,0 +1,18 @@
1
+ [project]
2
+ name = "tba-concrete-capability-default"
3
+ version = "0.4.0.dev2"
4
+ description = "Opinionated generic default capability implementation."
5
+ readme = "README.md"
6
+ requires-python = ">=3.10,<3.15"
7
+ license = "Apache-2.0"
8
+ dependencies = [
9
+ "tba-concrete-capability==0.4.0.dev2",
10
+ "tba-contracts-identity==0.4.0.dev2",
11
+ ]
12
+
13
+ [build-system]
14
+ requires = ["poetry-core>=1.0.0"]
15
+ build-backend = "poetry.core.masonry.api"
16
+
17
+ [tool.poetry]
18
+ packages = [{ include = "tba_concrete_capability_default", from = "src" }]
@@ -0,0 +1,34 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+
5
+ from tba_concrete_capability import Capability
6
+ from tba_contracts_identity.capabilities import (
7
+ CapabilityDefinition,
8
+ CapabilityOperation,
9
+ CapabilityState,
10
+ CapabilityStateProvider,
11
+ )
12
+
13
+
14
+ class DefaultCapability(Capability):
15
+ DEFAULT_STATE = CapabilityState(ready=True, healthy=True, status="ready")
16
+
17
+ def __init__(
18
+ self,
19
+ definition: CapabilityDefinition,
20
+ /,
21
+ *,
22
+ operations: Mapping[str, CapabilityOperation],
23
+ attributes: Mapping[str, object] | None = None,
24
+ state: CapabilityState | CapabilityStateProvider | None = None,
25
+ ) -> None:
26
+ super().__init__(
27
+ definition,
28
+ operations=operations,
29
+ attributes=attributes,
30
+ state=state if state is not None else self.DEFAULT_STATE,
31
+ )
32
+
33
+
34
+ __all__ = ["DefaultCapability"]