tigrbl-base 0.1.0.dev15__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 (38) hide show
  1. tigrbl_base-0.1.10.dev1/PKG-INFO +47 -0
  2. tigrbl_base-0.1.10.dev1/README.md +23 -0
  3. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/pyproject.toml +3 -3
  4. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_app_base.py +3 -0
  5. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_column_base.py +7 -1
  6. tigrbl_base-0.1.10.dev1/tigrbl_base/_base/_datatype_lowering.py +61 -0
  7. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_hook_base.py +1 -2
  8. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_table_base.py +5 -1
  9. tigrbl_base-0.1.0.dev15/PKG-INFO +0 -53
  10. tigrbl_base-0.1.0.dev15/README.md +0 -29
  11. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/__init__.py +0 -0
  12. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_alias_base.py +0 -0
  13. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_assembly.py +0 -0
  14. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_binding_base.py +0 -0
  15. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_engine_base.py +0 -0
  16. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_engine_provider_base.py +0 -0
  17. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_headers_base.py +0 -0
  18. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_mapping_access.py +0 -0
  19. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_middleware_base.py +0 -0
  20. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_op_base.py +0 -0
  21. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_request_base.py +0 -0
  22. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_response_base.py +0 -0
  23. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_rest_map.py +0 -0
  24. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_router_base.py +0 -0
  25. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_rpc_map.py +0 -0
  26. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_schema_base.py +0 -0
  27. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_security_base.py +0 -0
  28. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_session_abc.py +0 -0
  29. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_session_base.py +0 -0
  30. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_storage.py +0 -0
  31. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/_base/_table_registry_base.py +0 -0
  32. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/column/__init__.py +0 -0
  33. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/column/infer/__init__.py +0 -0
  34. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/column/infer/core.py +0 -0
  35. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/column/infer/jsonhints.py +0 -0
  36. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/column/infer/planning.py +0 -0
  37. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/column/infer/types.py +0 -0
  38. {tigrbl_base-0.1.0.dev15 → tigrbl_base-0.1.10.dev1}/tigrbl_base/column/infer/utils.py +0 -0
@@ -0,0 +1,47 @@
1
+ Metadata-Version: 2.4
2
+ Name: tigrbl-base
3
+ Version: 0.1.10.dev1
4
+ Summary: Abstract base interfaces for Tigrbl APIs and runtime components.
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.0)
19
+ Requires-Dist: sqlalchemy (>=2.0)
20
+ Requires-Dist: tigrbl-atoms
21
+ Requires-Dist: tigrbl-core
22
+ Description-Content-Type: text/markdown
23
+
24
+ # tigrbl_base
25
+
26
+ This file is a package-local distribution entry point.
27
+ It is not the authoritative location for repository governance, current target status, current state reporting, certification claims, or release evidence.
28
+
29
+ ## Canonical repository docs
30
+
31
+ - `README.md`
32
+ - `docs/README.md`
33
+ - `docs/conformance/CURRENT_TARGET.md`
34
+ - `docs/conformance/CURRENT_STATE.md`
35
+ - `docs/conformance/NEXT_STEPS.md`
36
+ - `docs/governance/DOC_POINTERS.md`
37
+ - `docs/developer/PACKAGE_CATALOG.md`
38
+ - `docs/developer/PACKAGE_LAYOUT.md`
39
+
40
+ ## Package identity
41
+
42
+ - workspace path: `pkgs/core/tigrbl_base`
43
+ - workspace class: core Python package
44
+ - implementation layout: `tigrbl_base/`
45
+
46
+ Long-form repository documentation is governed from `docs/`.
47
+
@@ -0,0 +1,23 @@
1
+ # tigrbl_base
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_base`
20
+ - workspace class: core Python package
21
+ - implementation layout: `tigrbl_base/`
22
+
23
+ Long-form repository documentation is governed from `docs/`.
@@ -1,17 +1,17 @@
1
1
  [project]
2
2
  name = "tigrbl-base"
3
- version = "0.1.0.dev15"
3
+ version = "0.1.10.dev1"
4
4
  description = "Abstract base interfaces for Tigrbl APIs and runtime components."
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",
@@ -17,6 +17,7 @@ class AppBase(AppSpec):
17
17
  title: str = "Tigrbl"
18
18
  description: str | None = None
19
19
  version: str = "0.1.0"
20
+ execution_backend: str = "auto"
20
21
  engine: Optional[EngineCfg] = None
21
22
  routers: Sequence[Any] = ()
22
23
  ops: Sequence[Any] = ()
@@ -99,6 +100,7 @@ class AppBase(AppSpec):
99
100
  title=spec.title,
100
101
  description=spec.description,
101
102
  version=spec.version,
103
+ execution_backend=spec.execution_backend,
102
104
  engine=spec.engine,
103
105
  routers=routers,
104
106
  ops=tuple(spec.ops or ()),
@@ -131,6 +133,7 @@ class AppBase(AppSpec):
131
133
  title=str(spec.title or "Tigrbl"),
132
134
  description=spec.description,
133
135
  version=str(spec.version or "0.1.0"),
136
+ execution_backend=str(spec.execution_backend or "auto"),
134
137
  engine=spec.engine,
135
138
  routers=cls._bind_mapped_children(spec.routers, parent=parent),
136
139
  ops=cls._bind_mapped_children(spec.ops, parent=parent),
@@ -5,6 +5,7 @@ from typing import Any, Callable, Optional
5
5
  from sqlalchemy import ForeignKey
6
6
  from sqlalchemy.orm import MappedColumn
7
7
 
8
+ from ._datatype_lowering import lower_datatype_to_sqla_type
8
9
  from tigrbl_core._spec.column_spec import ColumnSpec
9
10
  from tigrbl_core._spec.field_spec import FieldSpec as F
10
11
  from tigrbl_core._spec.io_spec import IOSpec as IO
@@ -49,7 +50,10 @@ class ColumnBase(ColumnSpec, MappedColumn):
49
50
 
50
51
  s = storage
51
52
  if s is not None:
52
- args: list[Any] = [s.type_]
53
+ dtype = s.type_ or lower_datatype_to_sqla_type(
54
+ getattr(spec, "datatype", None), field=field
55
+ )
56
+ args: list[Any] = [dtype]
53
57
  fk = getattr(s, "fk", None)
54
58
  if fk is not None:
55
59
  args.append(
@@ -76,10 +80,12 @@ class ColumnBase(ColumnSpec, MappedColumn):
76
80
  comment=s.comment,
77
81
  **kw,
78
82
  )
83
+ self.type = dtype
79
84
  else:
80
85
  MappedColumn.__init__(self, **kw)
81
86
 
82
87
  self.storage = s
88
+ self.datatype = getattr(spec, "datatype", None)
83
89
  self.field = field if field is not None else F()
84
90
  self.io = io if io is not None else IO()
85
91
  self.default_factory = default_factory
@@ -0,0 +1,61 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any
4
+
5
+ from tigrbl_core._spec.datatypes import DataTypeSpec
6
+
7
+
8
+ def lower_datatype_to_sqla_type(datatype: DataTypeSpec | None, *, field: Any = None) -> Any:
9
+ """Lower a canonical datatype into a SQLAlchemy type/instance."""
10
+
11
+ if datatype is None:
12
+ return None
13
+
14
+ from sqlalchemy import (
15
+ JSON,
16
+ Boolean,
17
+ Date,
18
+ DateTime,
19
+ Float,
20
+ Integer,
21
+ LargeBinary,
22
+ Numeric,
23
+ String,
24
+ Time,
25
+ )
26
+
27
+ logical = datatype.logical_name
28
+ options = dict(getattr(datatype, "options", {}) or {})
29
+ max_length = options.get("max_length")
30
+ if max_length is None and field is not None:
31
+ constraints = getattr(field, "constraints", {}) or {}
32
+ max_length = constraints.get("max_length")
33
+
34
+ if logical in {"string", "uuid", "ulid"}:
35
+ return String(max_length) if max_length else String()
36
+ if logical == "integer":
37
+ return Integer()
38
+ if logical == "number":
39
+ return Float()
40
+ if logical == "decimal":
41
+ return Numeric()
42
+ if logical == "boolean":
43
+ return Boolean()
44
+ if logical == "bytes":
45
+ return LargeBinary()
46
+ if logical == "date":
47
+ return Date()
48
+ if logical == "datetime":
49
+ return DateTime()
50
+ if logical == "time":
51
+ return Time()
52
+ if logical in {"json", "array", "object"}:
53
+ return JSON()
54
+ if logical == "duration":
55
+ try:
56
+ from sqlalchemy import Interval
57
+
58
+ return Interval()
59
+ except Exception:
60
+ return String()
61
+ return String(max_length) if max_length else String()
@@ -3,7 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from dataclasses import dataclass
6
- from typing import Iterable, Optional, Union
6
+ from typing import Optional
7
7
 
8
8
  from tigrbl_core._spec.hook_spec import HookSpec
9
9
  from tigrbl_atoms import HookPhase, StepFn
@@ -15,7 +15,6 @@ class HookBase(HookSpec):
15
15
 
16
16
  phase: HookPhase
17
17
  fn: StepFn
18
- ops: Union[str, Iterable[str]] = "*"
19
18
  order: int = 0
20
19
  when: Optional[object] = None
21
20
  name: Optional[str] = None
@@ -10,6 +10,8 @@ from sqlalchemy.orm import DeclarativeBase, declared_attr, mapped_column
10
10
  from sqlalchemy import CheckConstraint, ForeignKey, MetaData
11
11
  from sqlalchemy.types import Enum as SAEnum, String
12
12
 
13
+ from ._datatype_lowering import lower_datatype_to_sqla_type
14
+
13
15
  # ──────────────────────────────────────────────────────────────────────────────
14
16
  # Helpers – type inference & SA type instantiation
15
17
  # ──────────────────────────────────────────────────────────────────────────────
@@ -148,7 +150,9 @@ def _materialize_colspecs_to_sqla(cls, *, map_columns: bool = True) -> None:
148
150
  # that trigger SQLAlchemy implicit combination warnings.
149
151
  continue
150
152
 
151
- dtype = getattr(storage, "type_", None)
153
+ dtype = getattr(storage, "type_", None) or lower_datatype_to_sqla_type(
154
+ getattr(spec, "datatype", None), field=getattr(spec, "field", None)
155
+ )
152
156
  if not dtype:
153
157
  # No SA dtype specified – cannot materialize
154
158
  continue
@@ -1,53 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: tigrbl-base
3
- Version: 0.1.0.dev15
4
- Summary: Abstract base interfaces for Tigrbl APIs and runtime components.
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.0)
19
- Requires-Dist: sqlalchemy (>=2.0)
20
- Requires-Dist: tigrbl-atoms
21
- Requires-Dist: tigrbl-core
22
- Description-Content-Type: text/markdown
23
-
24
- ![Tigrbl branding](https://github.com/swarmauri/swarmauri-sdk/blob/a170683ecda8ca1c4f912c966d4499649ffb8224/assets/tigrbl.brand.theme.svg)
25
-
26
- # tigrbl-base
27
-
28
- ![PyPI - Downloads](https://img.shields.io/pypi/dm/tigrbl-base.svg) ![Hits](https://hits.sh/github.com/swarmauri/swarmauri-sdk.svg) ![Python Versions](https://img.shields.io/pypi/pyversions/tigrbl-base.svg) ![License](https://img.shields.io/pypi/l/tigrbl-base.svg) ![Version](https://img.shields.io/pypi/v/tigrbl-base.svg)
29
-
30
- ## Features
31
-
32
- - Modular package in the Tigrbl namespace.
33
- - Supports Python 3.10 through 3.12.
34
- - Distributed as part of the swarmauri-sdk workspace.
35
-
36
- ## Installation
37
-
38
- ### uv
39
-
40
- ```bash
41
- uv add tigrbl-base
42
- ```
43
-
44
- ### pip
45
-
46
- ```bash
47
- pip install tigrbl-base
48
- ```
49
-
50
- ## Usage
51
-
52
- Import from the shared package-specific module namespaces after installation in your environment.
53
-
@@ -1,29 +0,0 @@
1
- ![Tigrbl branding](https://github.com/swarmauri/swarmauri-sdk/blob/a170683ecda8ca1c4f912c966d4499649ffb8224/assets/tigrbl.brand.theme.svg)
2
-
3
- # tigrbl-base
4
-
5
- ![PyPI - Downloads](https://img.shields.io/pypi/dm/tigrbl-base.svg) ![Hits](https://hits.sh/github.com/swarmauri/swarmauri-sdk.svg) ![Python Versions](https://img.shields.io/pypi/pyversions/tigrbl-base.svg) ![License](https://img.shields.io/pypi/l/tigrbl-base.svg) ![Version](https://img.shields.io/pypi/v/tigrbl-base.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-base
19
- ```
20
-
21
- ### pip
22
-
23
- ```bash
24
- pip install tigrbl-base
25
- ```
26
-
27
- ## Usage
28
-
29
- Import from the shared package-specific module namespaces after installation in your environment.