tigrbl-typing 0.1.0.dev13__tar.gz → 0.1.10.dev1__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 (26) hide show
  1. tigrbl_typing-0.1.10.dev1/PKG-INFO +44 -0
  2. tigrbl_typing-0.1.10.dev1/README.md +23 -0
  3. {tigrbl_typing-0.1.0.dev13 → tigrbl_typing-0.1.10.dev1}/pyproject.toml +3 -3
  4. tigrbl_typing-0.1.10.dev1/tigrbl_typing/__init__.py +26 -0
  5. tigrbl_typing-0.1.10.dev1/tigrbl_typing/channel.py +43 -0
  6. {tigrbl_typing-0.1.0.dev13 → tigrbl_typing-0.1.10.dev1}/tigrbl_typing/status/converters.py +10 -1
  7. {tigrbl_typing-0.1.0.dev13 → tigrbl_typing-0.1.10.dev1}/tigrbl_typing/types/__init__.py +5 -0
  8. tigrbl_typing-0.1.10.dev1/tigrbl_typing/types/channel.py +13 -0
  9. tigrbl_typing-0.1.0.dev13/PKG-INFO +0 -50
  10. tigrbl_typing-0.1.0.dev13/README.md +0 -29
  11. tigrbl_typing-0.1.0.dev13/tigrbl_typing/__init__.py +0 -5
  12. {tigrbl_typing-0.1.0.dev13 → tigrbl_typing-0.1.10.dev1}/tigrbl_typing/gw/__init__.py +0 -0
  13. {tigrbl_typing-0.1.0.dev13 → tigrbl_typing-0.1.10.dev1}/tigrbl_typing/gw/raw.py +0 -0
  14. {tigrbl_typing-0.1.0.dev13 → tigrbl_typing-0.1.10.dev1}/tigrbl_typing/phases.py +0 -0
  15. {tigrbl_typing-0.1.0.dev13 → tigrbl_typing-0.1.10.dev1}/tigrbl_typing/protocols.py +0 -0
  16. {tigrbl_typing-0.1.0.dev13 → tigrbl_typing-0.1.10.dev1}/tigrbl_typing/request.py +0 -0
  17. {tigrbl_typing-0.1.0.dev13 → tigrbl_typing-0.1.10.dev1}/tigrbl_typing/status/__init__.py +0 -0
  18. {tigrbl_typing-0.1.0.dev13 → tigrbl_typing-0.1.10.dev1}/tigrbl_typing/status/exceptions.py +0 -0
  19. {tigrbl_typing-0.1.0.dev13 → tigrbl_typing-0.1.10.dev1}/tigrbl_typing/status/mappings.py +0 -0
  20. {tigrbl_typing-0.1.0.dev13 → tigrbl_typing-0.1.10.dev1}/tigrbl_typing/status/utils.py +0 -0
  21. {tigrbl_typing-0.1.0.dev13 → tigrbl_typing-0.1.10.dev1}/tigrbl_typing/types/authn_abc.py +0 -0
  22. {tigrbl_typing-0.1.0.dev13 → tigrbl_typing-0.1.10.dev1}/tigrbl_typing/types/op.py +0 -0
  23. {tigrbl_typing-0.1.0.dev13 → tigrbl_typing-0.1.10.dev1}/tigrbl_typing/types/uuid.py +0 -0
  24. {tigrbl_typing-0.1.0.dev13 → tigrbl_typing-0.1.10.dev1}/tigrbl_typing/vendor/__init__.py +0 -0
  25. {tigrbl_typing-0.1.0.dev13 → tigrbl_typing-0.1.10.dev1}/tigrbl_typing/vendor/pydantic.py +0 -0
  26. {tigrbl_typing-0.1.0.dev13 → tigrbl_typing-0.1.10.dev1}/tigrbl_typing/vendor/sqlalchemy.py +0 -0
@@ -0,0 +1,44 @@
1
+ Metadata-Version: 2.4
2
+ Name: tigrbl-typing
3
+ Version: 0.1.10.dev1
4
+ Summary: Typing protocols and shared type helpers for the Tigrbl framework.
5
+ License-Expression: Apache-2.0
6
+ Keywords: tigrbl,sdk,standards,framework
7
+ Author: Jacob Stewart
8
+ Author-email: jacob@swarmauri.com
9
+ Requires-Python: >=3.10,<3.14
10
+ Classifier: Development Status :: 1 - Planning
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Requires-Dist: pydantic (>=2.10,<3)
19
+ Description-Content-Type: text/markdown
20
+
21
+ # tigrbl_typing
22
+
23
+ This file is a package-local distribution entry point.
24
+ It is not the authoritative location for repository governance, current target status, current state reporting, certification claims, or release evidence.
25
+
26
+ ## Canonical repository docs
27
+
28
+ - `README.md`
29
+ - `docs/README.md`
30
+ - `docs/conformance/CURRENT_TARGET.md`
31
+ - `docs/conformance/CURRENT_STATE.md`
32
+ - `docs/conformance/NEXT_STEPS.md`
33
+ - `docs/governance/DOC_POINTERS.md`
34
+ - `docs/developer/PACKAGE_CATALOG.md`
35
+ - `docs/developer/PACKAGE_LAYOUT.md`
36
+
37
+ ## Package identity
38
+
39
+ - workspace path: `pkgs/core/tigrbl_typing`
40
+ - workspace class: core Python package
41
+ - implementation layout: `tigrbl_typing/`
42
+
43
+ Long-form repository documentation is governed from `docs/`.
44
+
@@ -0,0 +1,23 @@
1
+ # tigrbl_typing
2
+
3
+ This file is a package-local distribution entry point.
4
+ It is not the authoritative location for repository governance, current target status, current state reporting, certification claims, or release evidence.
5
+
6
+ ## Canonical repository docs
7
+
8
+ - `README.md`
9
+ - `docs/README.md`
10
+ - `docs/conformance/CURRENT_TARGET.md`
11
+ - `docs/conformance/CURRENT_STATE.md`
12
+ - `docs/conformance/NEXT_STEPS.md`
13
+ - `docs/governance/DOC_POINTERS.md`
14
+ - `docs/developer/PACKAGE_CATALOG.md`
15
+ - `docs/developer/PACKAGE_LAYOUT.md`
16
+
17
+ ## Package identity
18
+
19
+ - workspace path: `pkgs/core/tigrbl_typing`
20
+ - workspace class: core Python package
21
+ - implementation layout: `tigrbl_typing/`
22
+
23
+ Long-form repository documentation is governed from `docs/`.
@@ -1,17 +1,17 @@
1
1
  [project]
2
2
  name = "tigrbl-typing"
3
- version = "0.1.0.dev13"
3
+ version = "0.1.10.dev1"
4
4
  description = "Typing protocols and shared type helpers for the Tigrbl framework."
5
5
  license = "Apache-2.0"
6
6
  readme = "README.md"
7
7
  repository = "http://github.com/swarmauri/swarmauri-sdk"
8
- requires-python = ">=3.10,<3.13"
8
+ requires-python = ">=3.10,<3.14"
9
9
  classifiers = [
10
- "License :: OSI Approved :: Apache Software License",
11
10
  "Development Status :: 1 - Planning",
12
11
  "Programming Language :: Python :: 3.10",
13
12
  "Programming Language :: Python :: 3.11",
14
13
  "Programming Language :: Python :: 3.12",
14
+ "Programming Language :: Python :: 3.13",
15
15
  "Programming Language :: Python",
16
16
  "Programming Language :: Python :: 3",
17
17
  "Programming Language :: Python :: 3 :: Only",
@@ -0,0 +1,26 @@
1
+ """Public exports for ``tigrbl_typing`` with lazy loading."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from importlib import import_module
6
+ from typing import Any
7
+
8
+ _LAZY_EXPORTS = {
9
+ 'OpChannel': 'channel',
10
+ 'OpChannelFamily': 'channel',
11
+ 'OpChannelKind': 'channel',
12
+ 'OpChannelSubevent': 'channel',
13
+ 'PgUUID': 'types',
14
+ }
15
+
16
+ __all__ = list(_LAZY_EXPORTS)
17
+
18
+
19
+ def __getattr__(name: str) -> Any:
20
+ module_name = _LAZY_EXPORTS.get(name)
21
+ if module_name is None:
22
+ raise AttributeError(name)
23
+ module = import_module(f"{__name__}.{module_name}")
24
+ value = getattr(module, name)
25
+ globals()[name] = value
26
+ return value
@@ -0,0 +1,43 @@
1
+ from __future__ import annotations
2
+
3
+ from dataclasses import dataclass, field
4
+ from typing import Any, Callable, Literal, Mapping, Sequence
5
+
6
+ OpChannelKind = Literal["http", "websocket", "sse", "stream", "webtransport"]
7
+ OpChannelFamily = Literal["request", "response", "stream", "socket", "session"]
8
+ OpChannelSubevent = Literal[
9
+ "connect",
10
+ "receive",
11
+ "emit",
12
+ "complete",
13
+ "disconnect",
14
+ ]
15
+
16
+
17
+ @dataclass(slots=True)
18
+ class OpChannel:
19
+ """Runtime transport descriptor shared across Python and Rust surfaces."""
20
+
21
+ kind: OpChannelKind
22
+ family: OpChannelFamily
23
+ exchange: str
24
+ protocol: str
25
+ path: str
26
+ method: str | None = None
27
+ selector: str | None = None
28
+ framing: str | None = None
29
+ subevents: tuple[OpChannelSubevent, ...] = ()
30
+ headers: Mapping[str, str] = field(default_factory=dict)
31
+ query: Mapping[str, Sequence[str]] = field(default_factory=dict)
32
+ path_params: Mapping[str, str] = field(default_factory=dict)
33
+ state: dict[str, Any] = field(default_factory=dict)
34
+ send: Callable[[Any], Any] | None = None
35
+ receive: Callable[[], Any] | None = None
36
+
37
+
38
+ __all__ = [
39
+ "OpChannel",
40
+ "OpChannelFamily",
41
+ "OpChannelKind",
42
+ "OpChannelSubevent",
43
+ ]
@@ -134,7 +134,16 @@ def _classify_exception(
134
134
  msg = _stringify_exc(exc)
135
135
  lower_msg = msg.lower()
136
136
  if "not null constraint" in lower_msg or "check constraint" in lower_msg:
137
- return status.HTTP_422_UNPROCESSABLE_ENTITY, msg, None
137
+ data: dict[str, Any] = {"detail": msg}
138
+ marker = "not null constraint failed:"
139
+ if marker in lower_msg:
140
+ raw_field = msg[lower_msg.index(marker) + len(marker):].strip()
141
+ field = raw_field.splitlines()[0].split(".")[-1].strip()
142
+ if field:
143
+ data["loc"] = ["body", field]
144
+ data["msg"] = "Field required"
145
+ data["type"] = "missing"
146
+ return status.HTTP_422_UNPROCESSABLE_ENTITY, msg, data
138
147
  return status.HTTP_409_CONFLICT, msg, None
139
148
 
140
149
  if (OperationalError is not None) and isinstance(exc, OperationalError):
@@ -56,6 +56,7 @@ from ..vendor.pydantic import (
56
56
  from ..status.exceptions import StatusDetailError
57
57
 
58
58
  # ── Local Package ─────────────────────────────────────────────────────────
59
+ from .channel import OpChannel, OpChannelFamily, OpChannelKind, OpChannelSubevent
59
60
  from .op import _Op, _SchemaVerb
60
61
  from .uuid import PgUUID, SqliteUUID
61
62
  from .authn_abc import AuthNProvider
@@ -71,6 +72,10 @@ __all__: list[str] = [
71
72
  "_Op",
72
73
  "_SchemaVerb",
73
74
  "AuthNProvider",
75
+ "OpChannel",
76
+ "OpChannelFamily",
77
+ "OpChannelKind",
78
+ "OpChannelSubevent",
74
79
  # add ons
75
80
  "SqliteUUID",
76
81
  # builtin types
@@ -0,0 +1,13 @@
1
+ from tigrbl_typing.channel import (
2
+ OpChannel,
3
+ OpChannelFamily,
4
+ OpChannelKind,
5
+ OpChannelSubevent,
6
+ )
7
+
8
+ __all__ = [
9
+ "OpChannel",
10
+ "OpChannelFamily",
11
+ "OpChannelKind",
12
+ "OpChannelSubevent",
13
+ ]
@@ -1,50 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: tigrbl-typing
3
- Version: 0.1.0.dev13
4
- Summary: Typing protocols and shared type helpers for the Tigrbl framework.
5
- License-Expression: Apache-2.0
6
- Keywords: tigrbl,sdk,standards,framework
7
- Author: Jacob Stewart
8
- Author-email: jacob@swarmauri.com
9
- Requires-Python: >=3.10,<3.13
10
- Classifier: License :: OSI Approved :: Apache Software License
11
- Classifier: Development Status :: 1 - Planning
12
- Classifier: Programming Language :: Python :: 3.10
13
- Classifier: Programming Language :: Python :: 3.11
14
- Classifier: Programming Language :: Python :: 3.12
15
- Classifier: Programming Language :: Python
16
- Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3 :: Only
18
- Requires-Dist: pydantic (>=2.10,<3)
19
- Description-Content-Type: text/markdown
20
-
21
- ![Tigrbl branding](https://github.com/swarmauri/swarmauri-sdk/blob/a170683ecda8ca1c4f912c966d4499649ffb8224/assets/tigrbl.brand.theme.svg)
22
-
23
- # tigrbl-typing
24
-
25
- ![PyPI - Downloads](https://img.shields.io/pypi/dm/tigrbl-typing.svg) ![Hits](https://hits.sh/github.com/swarmauri/swarmauri-sdk.svg) ![Python Versions](https://img.shields.io/pypi/pyversions/tigrbl-typing.svg) ![License](https://img.shields.io/pypi/l/tigrbl-typing.svg) ![Version](https://img.shields.io/pypi/v/tigrbl-typing.svg)
26
-
27
- ## Features
28
-
29
- - Modular package in the Tigrbl namespace.
30
- - Supports Python 3.10 through 3.12.
31
- - Distributed as part of the swarmauri-sdk workspace.
32
-
33
- ## Installation
34
-
35
- ### uv
36
-
37
- ```bash
38
- uv add tigrbl-typing
39
- ```
40
-
41
- ### pip
42
-
43
- ```bash
44
- pip install tigrbl-typing
45
- ```
46
-
47
- ## Usage
48
-
49
- Import from the shared package-specific module namespaces after installation in your environment.
50
-
@@ -1,29 +0,0 @@
1
- ![Tigrbl branding](https://github.com/swarmauri/swarmauri-sdk/blob/a170683ecda8ca1c4f912c966d4499649ffb8224/assets/tigrbl.brand.theme.svg)
2
-
3
- # tigrbl-typing
4
-
5
- ![PyPI - Downloads](https://img.shields.io/pypi/dm/tigrbl-typing.svg) ![Hits](https://hits.sh/github.com/swarmauri/swarmauri-sdk.svg) ![Python Versions](https://img.shields.io/pypi/pyversions/tigrbl-typing.svg) ![License](https://img.shields.io/pypi/l/tigrbl-typing.svg) ![Version](https://img.shields.io/pypi/v/tigrbl-typing.svg)
6
-
7
- ## Features
8
-
9
- - Modular package in the Tigrbl namespace.
10
- - Supports Python 3.10 through 3.12.
11
- - Distributed as part of the swarmauri-sdk workspace.
12
-
13
- ## Installation
14
-
15
- ### uv
16
-
17
- ```bash
18
- uv add tigrbl-typing
19
- ```
20
-
21
- ### pip
22
-
23
- ```bash
24
- pip install tigrbl-typing
25
- ```
26
-
27
- ## Usage
28
-
29
- Import from the shared package-specific module namespaces after installation in your environment.
@@ -1,5 +0,0 @@
1
- """Public exports for ``tigrbl_typing``."""
2
-
3
- from .types import PgUUID
4
-
5
- __all__ = ["PgUUID"]