type-bridge 2.0.2__tar.gz → 2.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.
- {type_bridge-2.0.2 → type_bridge-2.2.0}/.gitignore +1 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/PKG-INFO +86 -87
- type_bridge-2.2.0/README.md +156 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/pyproject.toml +14 -8
- type_bridge-2.2.0/type_bridge/__init__.py +90 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/_backend.py +3 -3
- type_bridge-2.2.0/type_bridge/_runtime_projection.py +115 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/_rust_runtime.py +33 -61
- type_bridge-2.2.0/type_bridge/attribute/__init__.py +18 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/attribute/base.py +20 -12
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/attribute/boolean.py +6 -2
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/attribute/date.py +15 -11
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/attribute/datetime.py +15 -11
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/attribute/datetimetz.py +15 -11
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/attribute/decimal.py +4 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/attribute/double.py +4 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/attribute/duration.py +13 -9
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/attribute/flags.py +39 -12
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/attribute/integer.py +4 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/attribute/numeric.py +2 -2
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/attribute/string.py +20 -16
- type_bridge-2.2.0/type_bridge/crud/__init__.py +76 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/crud/has_lookup.py +5 -5
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/crud/hooks.py +1 -1
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/crud/lookup.py +1 -1
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/crud/patterns.py +2 -1
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/crud/role_lookup.py +2 -2
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/crud/role_players.py +4 -3
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/crud/rust_manager.py +10 -5
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/crud/strategies.py +13 -3
- type_bridge-2.2.0/type_bridge/crud/typedb_manager.py +12 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/crud/types.py +3 -3
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/expressions/aggregate.py +1 -1
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/expressions/arithmetic.py +1 -1
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/expressions/base.py +1 -1
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/expressions/boolean.py +1 -1
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/expressions/builtin.py +1 -1
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/expressions/comparison.py +1 -1
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/expressions/iid.py +1 -1
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/expressions/role_player.py +2 -2
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/expressions/string.py +1 -1
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/expressions/utils.py +1 -1
- type_bridge-2.2.0/type_bridge/fields/__init__.py +18 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/fields/base.py +38 -21
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/fields/role.py +29 -15
- type_bridge-2.2.0/type_bridge/migration/__init__.py +160 -0
- type_bridge-2.2.0/type_bridge/migration/__main__.py +16 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/migration/_adoption_authority.py +1 -1
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/migration/_adoption_import.py +1 -1
- type_bridge-2.2.0/type_bridge/migration/_archive_base.py +50 -0
- type_bridge-2.2.0/type_bridge/migration/_archive_imports.py +156 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/migration/_lower.py +5 -5
- type_bridge-2.0.2/type_bridge/migration/operations.py → type_bridge-2.2.0/type_bridge/migration/_operations.py +6 -5
- type_bridge-2.0.2/type_bridge/migration/ref.py → type_bridge-2.2.0/type_bridge/migration/_ref.py +1 -1
- type_bridge-2.2.0/type_bridge/migration/exceptions.py +34 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/migration/introspection.py +5 -3
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/migration/loader.py +11 -4
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/migration/sidecar.py +2 -2
- type_bridge-2.2.0/type_bridge/migration/snapshots.py +36 -0
- type_bridge-2.2.0/type_bridge/migration/state.py +124 -0
- type_bridge-2.2.0/type_bridge/models/__init__.py +19 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/models/base.py +34 -19
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/models/entity.py +24 -12
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/models/registry.py +5 -1
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/models/relation.py +22 -13
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/models/role.py +15 -6
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/models/schema_scanner.py +11 -5
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/models/utils.py +21 -12
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/proxy.py +0 -9
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/query/__init__.py +26 -15
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/query/ast.py +2 -2
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/session.py +98 -92
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/typed/__init__.py +3 -3
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/typed/_descriptors.py +16 -10
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/typed/_remote_terminal.py +1 -1
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/typed/_terminal.py +3 -1
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/typed/query.py +4 -2
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/typed/references.py +22 -12
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/typed/remote_query.py +1 -1
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/typed/remote_session.py +3 -3
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/typed/results.py +3 -3
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/typed/session.py +6 -5
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/typedb_driver.py +35 -33
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/validation.py +6 -3
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/version.py +3 -3
- type_bridge-2.0.2/README.md +0 -157
- type_bridge-2.0.2/type_bridge/__init__.py +0 -141
- type_bridge-2.0.2/type_bridge/_runtime_projection.py +0 -33
- type_bridge-2.0.2/type_bridge/attribute/__init__.py +0 -58
- type_bridge-2.0.2/type_bridge/crud/__init__.py +0 -41
- type_bridge-2.0.2/type_bridge/crud/typedb_manager.py +0 -19
- type_bridge-2.0.2/type_bridge/fields/__init__.py +0 -29
- type_bridge-2.0.2/type_bridge/generator/__init__.py +0 -231
- type_bridge-2.0.2/type_bridge/generator/__main__.py +0 -176
- type_bridge-2.0.2/type_bridge/generator/annotations.py +0 -235
- type_bridge-2.0.2/type_bridge/generator/api_dto.py +0 -577
- type_bridge-2.0.2/type_bridge/generator/dto_config.py +0 -382
- type_bridge-2.0.2/type_bridge/generator/models.py +0 -447
- type_bridge-2.0.2/type_bridge/generator/naming.py +0 -73
- type_bridge-2.0.2/type_bridge/generator/parser.py +0 -306
- type_bridge-2.0.2/type_bridge/generator/template_loader.py +0 -88
- type_bridge-2.0.2/type_bridge/generator/templates/_dto_macros.jinja +0 -269
- type_bridge-2.0.2/type_bridge/generator/templates/api_dto.py.jinja +0 -163
- type_bridge-2.0.2/type_bridge/generator/typeql.pest +0 -654
- type_bridge-2.0.2/type_bridge/generator/utils/__init__.py +0 -11
- type_bridge-2.0.2/type_bridge/generator/utils/common.py +0 -92
- type_bridge-2.0.2/type_bridge/generator/utils/types.py +0 -31
- type_bridge-2.0.2/type_bridge/migration/__init__.py +0 -221
- type_bridge-2.0.2/type_bridge/migration/__main__.py +0 -48
- type_bridge-2.0.2/type_bridge/migration/_generate.py +0 -220
- type_bridge-2.0.2/type_bridge/migration/_ir_dump.py +0 -127
- type_bridge-2.0.2/type_bridge/migration/author.py +0 -140
- type_bridge-2.0.2/type_bridge/migration/base.py +0 -98
- type_bridge-2.0.2/type_bridge/migration/breaking.py +0 -149
- type_bridge-2.0.2/type_bridge/migration/diff.py +0 -564
- type_bridge-2.0.2/type_bridge/migration/exceptions.py +0 -141
- type_bridge-2.0.2/type_bridge/migration/executor.py +0 -916
- type_bridge-2.0.2/type_bridge/migration/generator.py +0 -164
- type_bridge-2.0.2/type_bridge/migration/info.py +0 -251
- type_bridge-2.0.2/type_bridge/migration/registry.py +0 -223
- type_bridge-2.0.2/type_bridge/migration/schema_manager.py +0 -424
- type_bridge-2.0.2/type_bridge/migration/simple_migration.py +0 -129
- type_bridge-2.0.2/type_bridge/migration/snapshots.py +0 -313
- type_bridge-2.0.2/type_bridge/migration/state.py +0 -411
- type_bridge-2.0.2/type_bridge/models/__init__.py +0 -23
- {type_bridge-2.0.2 → type_bridge-2.2.0}/LICENSE +0 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/_rust.py +0 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/coercion.py +0 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/crud/aggregates.py +0 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/crud/exceptions.py +0 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/crud/formatting.py +0 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/crud/utils.py +0 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/expressions/__init__.py +0 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/expressions/functions.py +0 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/migration/state_schema.py +0 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/migration/utils.py +0 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/py.typed +0 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/query/compiler.py +0 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/query/parser.py +0 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/query_v2.py +0 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/reserved_words.py +0 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/rules.py +0 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/typed/page.py +0 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/typed/remote_limits.py +0 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/typeql/__init__.py +0 -0
- {type_bridge-2.0.2 → type_bridge-2.2.0}/type_bridge/typeql/annotations.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: type-bridge
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.2.0
|
|
4
4
|
Summary: Typed Python, TypeScript, and Rust application tooling for TypeDB
|
|
5
5
|
Project-URL: Homepage, https://github.com/ds1sqe/type-bridge
|
|
6
6
|
Project-URL: Repository, https://github.com/ds1sqe/type-bridge
|
|
@@ -23,7 +23,7 @@ Requires-Python: <3.15,>=3.12
|
|
|
23
23
|
Requires-Dist: isodate==0.7.2
|
|
24
24
|
Requires-Dist: jinja2>=3.1.0
|
|
25
25
|
Requires-Dist: pydantic>=2.12.4
|
|
26
|
-
Requires-Dist: type-bridge-core==2.0
|
|
26
|
+
Requires-Dist: type-bridge-core==2.2.0
|
|
27
27
|
Requires-Dist: typer>=0.15.0
|
|
28
28
|
Requires-Dist: typing-extensions>=4.12
|
|
29
29
|
Provides-Extra: dev
|
|
@@ -35,7 +35,7 @@ Requires-Dist: pytest-order>=1.2.0; extra == 'dev'
|
|
|
35
35
|
Requires-Dist: pytest>=9.0.1; extra == 'dev'
|
|
36
36
|
Requires-Dist: pyyaml>=6.0.3; extra == 'dev'
|
|
37
37
|
Requires-Dist: ruff==0.15.21; extra == 'dev'
|
|
38
|
-
Requires-Dist: typedb-driver==3.12.
|
|
38
|
+
Requires-Dist: typedb-driver==3.12.3; (python_version >= '3.14') and extra == 'dev'
|
|
39
39
|
Requires-Dist: typedb-driver~=3.11.5; (python_version < '3.14') and extra == 'dev'
|
|
40
40
|
Provides-Extra: docs
|
|
41
41
|
Requires-Dist: mkdocs-gen-files>=0.5; extra == 'docs'
|
|
@@ -45,8 +45,8 @@ Requires-Dist: mkdocs-section-index>=0.3; extra == 'docs'
|
|
|
45
45
|
Requires-Dist: mkdocs>=1.6; extra == 'docs'
|
|
46
46
|
Requires-Dist: mkdocstrings[python]>=0.27; extra == 'docs'
|
|
47
47
|
Provides-Extra: typedb-driver
|
|
48
|
-
Requires-Dist: typedb-driver<3.13,>=3.
|
|
49
|
-
Requires-Dist: typedb-driver==3.12.
|
|
48
|
+
Requires-Dist: typedb-driver<3.13,>=3.11; (python_version < '3.14') and extra == 'typedb-driver'
|
|
49
|
+
Requires-Dist: typedb-driver==3.12.3; (python_version >= '3.14') and extra == 'typedb-driver'
|
|
50
50
|
Description-Content-Type: text/markdown
|
|
51
51
|
|
|
52
52
|
<p align="center">
|
|
@@ -63,73 +63,79 @@ Description-Content-Type: text/markdown
|
|
|
63
63
|
</p>
|
|
64
64
|
|
|
65
65
|
TypeBridge is a typed application toolkit for [TypeDB](https://typedb.com/).
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
and the standalone query server.
|
|
66
|
+
A versioned Split-YAML workspace is the schema authority. TypeBridge validates
|
|
67
|
+
that workspace and generates Python, TypeScript/Node, and Rust bindings that
|
|
68
|
+
share one Rust-owned schema, query, migration, validation, and ORM engine.
|
|
70
69
|
|
|
71
|
-
## One system,
|
|
70
|
+
## One system, three generated SDKs
|
|
72
71
|
|
|
73
|
-
|
|
74
|
-
[exact expanded 2.1 inventory and safe pins](https://github.com/ds1sqe/type-bridge/releases/tag/v2.0.2)
|
|
75
|
-
before upgrading beyond 2.0.x. No API is removed or new warning added here.
|
|
76
|
-
|
|
77
|
-
| Surface | Use it for | Distribution |
|
|
72
|
+
| Surface | Generated application API | Distribution |
|
|
78
73
|
| --- | --- | --- |
|
|
79
|
-
| Python |
|
|
80
|
-
| TypeScript / Node | Branded
|
|
81
|
-
| Rust |
|
|
82
|
-
| CLI
|
|
83
|
-
| Server | Remote V2 query execution over the same
|
|
84
|
-
|
|
85
|
-
TypeBridge is designed around TypeDB rather than flattened into a relational
|
|
86
|
-
ORM shape:
|
|
74
|
+
| Python | Value classes, model managers, transactions, direct/remote queries | [`type-bridge`](https://pypi.org/project/type-bridge/) |
|
|
75
|
+
| TypeScript / Node | Branded values, model managers, native and remote queries | [`@type-bridge/node`](https://www.npmjs.com/package/@type-bridge/node) |
|
|
76
|
+
| Rust | Schema-bound create/model types, async CRUD and immutable queries | [`type-bridge`](https://crates.io/crates/type-bridge) |
|
|
77
|
+
| CLI | Split-YAML checks, migrations, and all three projections | Included with the Python package |
|
|
78
|
+
| Server | Remote V2 query execution over the same generated contract | `ghcr.io/ds1sqe/type-bridge-server` |
|
|
87
79
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
- direct and remote immutable queries preserve typed, owner-aware results;
|
|
92
|
-
- Python and Node are thin facades over the shared Rust runtime.
|
|
80
|
+
TypeBridge preserves TypeDB concepts directly: independent attributes,
|
|
81
|
+
entities, relations, roles, inheritance, cardinality, ordering, keys, and
|
|
82
|
+
uniqueness remain typed from schema through hydrated results.
|
|
93
83
|
|
|
94
|
-
## Start
|
|
84
|
+
## Start from Split-YAML
|
|
95
85
|
|
|
96
|
-
|
|
86
|
+
Install the CLI and Python runtime:
|
|
97
87
|
|
|
98
88
|
```bash
|
|
99
89
|
pip install type-bridge
|
|
100
90
|
```
|
|
101
91
|
|
|
102
|
-
|
|
103
|
-
|
|
92
|
+
Create `typebridge.yaml`, a schema-set manifest, and one or more schema
|
|
93
|
+
fragments. Configure the generated package output in the workspace, then run:
|
|
104
94
|
|
|
105
|
-
|
|
106
|
-
|
|
95
|
+
```bash
|
|
96
|
+
type-bridge --manifest typebridge.yaml schema check
|
|
97
|
+
type-bridge --manifest typebridge.yaml schema generate
|
|
98
|
+
type-bridge --manifest typebridge.yaml migration make --name initial
|
|
99
|
+
type-bridge --manifest typebridge.yaml migration apply --environment development
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
One generation snapshot writes every configured Python, TypeScript, and Rust
|
|
103
|
+
package. Generated packages privately embed the verified authority used by
|
|
104
|
+
their managers and direct or remote queries, so ordinary applications never
|
|
105
|
+
configure or read an external authority JSON. A workspace deploying the optional
|
|
106
|
+
generic server can additionally configure `artifacts.schema-authority.output`;
|
|
107
|
+
the server mounts that generated, source-free artifact instead of compiling
|
|
108
|
+
YAML or accepting a user-maintained JSON schema.
|
|
107
109
|
|
|
108
|
-
|
|
109
|
-
pass
|
|
110
|
+
The generated Python package owns the concise single-type manager:
|
|
110
111
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
```python
|
|
113
|
+
from app_models import Age, Person, PersonId
|
|
114
|
+
from type_bridge import Database
|
|
114
115
|
|
|
115
116
|
db = Database(address="localhost:1729", database="example")
|
|
116
117
|
db.connect()
|
|
117
|
-
db.create_database()
|
|
118
|
-
|
|
119
|
-
schema = SchemaManager(db)
|
|
120
|
-
schema.register(Person)
|
|
121
|
-
schema.sync_schema()
|
|
122
118
|
|
|
123
119
|
ada = Person(person_id=PersonId("ada"), age=Age(36))
|
|
124
120
|
Person.manager(db).put(ada)
|
|
125
121
|
people = Person.manager(db).filter(age__gte=18).all()
|
|
126
122
|
```
|
|
127
123
|
|
|
124
|
+
Use its package-local query session when a query spans types:
|
|
125
|
+
|
|
126
|
+
```python
|
|
127
|
+
session = Person.query(db)
|
|
128
|
+
person = session.exact(Person)
|
|
129
|
+
adults = (
|
|
130
|
+
session.query(person)
|
|
131
|
+
.where(person.field(Person.age).gte(Age(18)))
|
|
132
|
+
.rows(limit=100)
|
|
133
|
+
)
|
|
134
|
+
```
|
|
135
|
+
|
|
128
136
|
Continue with the [Python quick start](https://ds1sqe.github.io/type-bridge/getting-started/quickstart/),
|
|
129
|
-
|
|
130
|
-
[data](https://ds1sqe.github.io/type-bridge/guide/data/)
|
|
131
|
-
[schema](https://ds1sqe.github.io/type-bridge/guide/schema-workflows/)
|
|
132
|
-
workflow.
|
|
137
|
+
[Split-YAML reference](https://ds1sqe.github.io/type-bridge/guide/split-yaml-v1/),
|
|
138
|
+
and [data guide](https://ds1sqe.github.io/type-bridge/guide/data/).
|
|
133
139
|
|
|
134
140
|
## TypeScript / Node
|
|
135
141
|
|
|
@@ -137,55 +143,50 @@ workflow.
|
|
|
137
143
|
npm install @type-bridge/node
|
|
138
144
|
```
|
|
139
145
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
class PersonId extends attr.String("person-id") {}
|
|
144
|
-
class Person extends Entity("person", {
|
|
145
|
-
personId: field(PersonId, Key),
|
|
146
|
-
}) {}
|
|
146
|
+
Import application values from the generated package and connection primitives
|
|
147
|
+
from `@type-bridge/node`:
|
|
147
148
|
|
|
148
|
-
|
|
149
|
+
```ts
|
|
150
|
+
import { RustDatabase } from "@type-bridge/node";
|
|
151
|
+
import { Age, Person, PersonId } from "./generated/models/index.js";
|
|
152
|
+
|
|
153
|
+
const db = RustDatabase.connect("localhost:1729", "example", {
|
|
154
|
+
username: "admin",
|
|
155
|
+
password: "password",
|
|
156
|
+
});
|
|
157
|
+
const ada = Person.create({
|
|
158
|
+
personId: PersonId.create("ada"),
|
|
159
|
+
age: Age.create(36n),
|
|
160
|
+
});
|
|
161
|
+
Person.manager(db).put(ada);
|
|
162
|
+
const people = Person.manager(db).filter({ age__gte: Age.create(18n) }).all();
|
|
149
163
|
```
|
|
150
164
|
|
|
151
165
|
See the [TypeScript/Node guide](https://ds1sqe.github.io/type-bridge/guide/typescript/)
|
|
152
|
-
for
|
|
166
|
+
for generated managers, transactions, and direct/remote queries.
|
|
153
167
|
|
|
154
|
-
##
|
|
168
|
+
## Rust
|
|
155
169
|
|
|
156
|
-
The
|
|
157
|
-
|
|
170
|
+
The same workspace emits a schema-bound Rust crate. The generated SDK uses
|
|
171
|
+
Rust 1.88+ and the crates.io `type-bridge` runtime:
|
|
158
172
|
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
type-bridge
|
|
162
|
-
type-bridge --manifest typebridge.yaml migration make --name initial
|
|
163
|
-
type-bridge --manifest typebridge.yaml migration apply --environment development
|
|
173
|
+
```toml
|
|
174
|
+
[dependencies]
|
|
175
|
+
type-bridge = "2"
|
|
164
176
|
```
|
|
165
177
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
from its exact Git revision. Follow the
|
|
169
|
-
[Rust client guide](https://ds1sqe.github.io/type-bridge/guide/rust/) and
|
|
170
|
-
[Split-YAML reference](https://ds1sqe.github.io/type-bridge/guide/split-yaml-v1/)
|
|
171
|
-
for the reproducible setup.
|
|
178
|
+
Follow the [Rust client guide](https://ds1sqe.github.io/type-bridge/guide/rust/)
|
|
179
|
+
for generation, direct execution, transactions, and remote queries.
|
|
172
180
|
|
|
173
181
|
## Documentation
|
|
174
182
|
|
|
175
183
|
- [Install a surface](https://ds1sqe.github.io/type-bridge/getting-started/installation/)
|
|
176
|
-
- [
|
|
177
|
-
- [
|
|
178
|
-
- [Read and write data](https://ds1sqe.github.io/type-bridge/guide/data/)
|
|
184
|
+
- [Model data in Split-YAML](https://ds1sqe.github.io/type-bridge/guide/models/)
|
|
185
|
+
- [Read and write generated models](https://ds1sqe.github.io/type-bridge/guide/data/)
|
|
179
186
|
- [Manage schemas and migrations](https://ds1sqe.github.io/type-bridge/guide/schema-workflows/)
|
|
180
|
-
- [Run the server](https://ds1sqe.github.io/type-bridge/guide/server-container/)
|
|
181
|
-
- [
|
|
182
|
-
- [
|
|
183
|
-
|
|
184
|
-
TypeBridge 2.0.x supports TypeDB 3.8–3.12. Support for 3.8 and 3.10 is
|
|
185
|
-
deprecated and scheduled for removal in 2.1; consult the
|
|
186
|
-
[compatibility matrix](https://ds1sqe.github.io/type-bridge/development/typedb/#server-and-driver-compatibility)
|
|
187
|
-
and [deprecation inventory](https://ds1sqe.github.io/type-bridge/guide/v2-deprecations/)
|
|
188
|
-
before upgrading production deployments.
|
|
187
|
+
- [Run the query server](https://ds1sqe.github.io/type-bridge/guide/server-container/)
|
|
188
|
+
- [Browse the Cargo package index](https://ds1sqe.github.io/type-bridge/guide/cargo-packages/)
|
|
189
|
+
- [Compatibility and removals](https://ds1sqe.github.io/type-bridge/guide/v2-deprecations/)
|
|
189
190
|
|
|
190
191
|
## Development
|
|
191
192
|
|
|
@@ -197,12 +198,10 @@ uv run pytest
|
|
|
197
198
|
uv run --extra docs mkdocs build --strict
|
|
198
199
|
```
|
|
199
200
|
|
|
200
|
-
See [DEVELOPMENT.md](DEVELOPMENT.md) for repository
|
|
201
|
-
architecture, and contribution checks.
|
|
201
|
+
See [DEVELOPMENT.md](DEVELOPMENT.md) for repository boundaries and verification.
|
|
202
202
|
|
|
203
203
|
## License
|
|
204
204
|
|
|
205
205
|
TypeBridge-authored code is MIT licensed. Native artifacts also include
|
|
206
206
|
third-party TypeDB components under Apache-2.0 and MPL-2.0; exact notices ship
|
|
207
|
-
with each artifact
|
|
208
|
-
[`type-bridge-core/vendor/README.md`](type-bridge-core/vendor/README.md).
|
|
207
|
+
with each artifact.
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/ds1sqe/type-bridge/master/docs/assets/typebridge-hero.svg" alt="TypeBridge connects typed Python, TypeScript, and Rust applications to TypeDB through one semantic engine." width="100%">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://github.com/ds1sqe/type-bridge/actions/workflows/ci.yml"><img src="https://github.com/ds1sqe/type-bridge/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
7
|
+
<a href="https://pypi.org/project/type-bridge/"><img src="https://img.shields.io/pypi/v/type-bridge.svg" alt="PyPI"></a>
|
|
8
|
+
<a href="https://www.npmjs.com/package/@type-bridge/node"><img src="https://img.shields.io/npm/v/%40type-bridge%2Fnode.svg" alt="npm"></a>
|
|
9
|
+
<a href="https://crates.io/crates/type-bridge"><img src="https://img.shields.io/crates/v/type-bridge.svg" alt="crates.io"></a>
|
|
10
|
+
<a href="https://ds1sqe.github.io/type-bridge/"><img src="https://img.shields.io/badge/docs-TypeBridge-67e8f9" alt="Documentation"></a>
|
|
11
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-8b5cf6.svg" alt="MIT license"></a>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
TypeBridge is a typed application toolkit for [TypeDB](https://typedb.com/).
|
|
15
|
+
A versioned Split-YAML workspace is the schema authority. TypeBridge validates
|
|
16
|
+
that workspace and generates Python, TypeScript/Node, and Rust bindings that
|
|
17
|
+
share one Rust-owned schema, query, migration, validation, and ORM engine.
|
|
18
|
+
|
|
19
|
+
## One system, three generated SDKs
|
|
20
|
+
|
|
21
|
+
| Surface | Generated application API | Distribution |
|
|
22
|
+
| --- | --- | --- |
|
|
23
|
+
| Python | Value classes, model managers, transactions, direct/remote queries | [`type-bridge`](https://pypi.org/project/type-bridge/) |
|
|
24
|
+
| TypeScript / Node | Branded values, model managers, native and remote queries | [`@type-bridge/node`](https://www.npmjs.com/package/@type-bridge/node) |
|
|
25
|
+
| Rust | Schema-bound create/model types, async CRUD and immutable queries | [`type-bridge`](https://crates.io/crates/type-bridge) |
|
|
26
|
+
| CLI | Split-YAML checks, migrations, and all three projections | Included with the Python package |
|
|
27
|
+
| Server | Remote V2 query execution over the same generated contract | `ghcr.io/ds1sqe/type-bridge-server` |
|
|
28
|
+
|
|
29
|
+
TypeBridge preserves TypeDB concepts directly: independent attributes,
|
|
30
|
+
entities, relations, roles, inheritance, cardinality, ordering, keys, and
|
|
31
|
+
uniqueness remain typed from schema through hydrated results.
|
|
32
|
+
|
|
33
|
+
## Start from Split-YAML
|
|
34
|
+
|
|
35
|
+
Install the CLI and Python runtime:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pip install type-bridge
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Create `typebridge.yaml`, a schema-set manifest, and one or more schema
|
|
42
|
+
fragments. Configure the generated package output in the workspace, then run:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
type-bridge --manifest typebridge.yaml schema check
|
|
46
|
+
type-bridge --manifest typebridge.yaml schema generate
|
|
47
|
+
type-bridge --manifest typebridge.yaml migration make --name initial
|
|
48
|
+
type-bridge --manifest typebridge.yaml migration apply --environment development
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
One generation snapshot writes every configured Python, TypeScript, and Rust
|
|
52
|
+
package. Generated packages privately embed the verified authority used by
|
|
53
|
+
their managers and direct or remote queries, so ordinary applications never
|
|
54
|
+
configure or read an external authority JSON. A workspace deploying the optional
|
|
55
|
+
generic server can additionally configure `artifacts.schema-authority.output`;
|
|
56
|
+
the server mounts that generated, source-free artifact instead of compiling
|
|
57
|
+
YAML or accepting a user-maintained JSON schema.
|
|
58
|
+
|
|
59
|
+
The generated Python package owns the concise single-type manager:
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
from app_models import Age, Person, PersonId
|
|
63
|
+
from type_bridge import Database
|
|
64
|
+
|
|
65
|
+
db = Database(address="localhost:1729", database="example")
|
|
66
|
+
db.connect()
|
|
67
|
+
|
|
68
|
+
ada = Person(person_id=PersonId("ada"), age=Age(36))
|
|
69
|
+
Person.manager(db).put(ada)
|
|
70
|
+
people = Person.manager(db).filter(age__gte=18).all()
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Use its package-local query session when a query spans types:
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
session = Person.query(db)
|
|
77
|
+
person = session.exact(Person)
|
|
78
|
+
adults = (
|
|
79
|
+
session.query(person)
|
|
80
|
+
.where(person.field(Person.age).gte(Age(18)))
|
|
81
|
+
.rows(limit=100)
|
|
82
|
+
)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Continue with the [Python quick start](https://ds1sqe.github.io/type-bridge/getting-started/quickstart/),
|
|
86
|
+
[Split-YAML reference](https://ds1sqe.github.io/type-bridge/guide/split-yaml-v1/),
|
|
87
|
+
and [data guide](https://ds1sqe.github.io/type-bridge/guide/data/).
|
|
88
|
+
|
|
89
|
+
## TypeScript / Node
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npm install @type-bridge/node
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Import application values from the generated package and connection primitives
|
|
96
|
+
from `@type-bridge/node`:
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
import { RustDatabase } from "@type-bridge/node";
|
|
100
|
+
import { Age, Person, PersonId } from "./generated/models/index.js";
|
|
101
|
+
|
|
102
|
+
const db = RustDatabase.connect("localhost:1729", "example", {
|
|
103
|
+
username: "admin",
|
|
104
|
+
password: "password",
|
|
105
|
+
});
|
|
106
|
+
const ada = Person.create({
|
|
107
|
+
personId: PersonId.create("ada"),
|
|
108
|
+
age: Age.create(36n),
|
|
109
|
+
});
|
|
110
|
+
Person.manager(db).put(ada);
|
|
111
|
+
const people = Person.manager(db).filter({ age__gte: Age.create(18n) }).all();
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
See the [TypeScript/Node guide](https://ds1sqe.github.io/type-bridge/guide/typescript/)
|
|
115
|
+
for generated managers, transactions, and direct/remote queries.
|
|
116
|
+
|
|
117
|
+
## Rust
|
|
118
|
+
|
|
119
|
+
The same workspace emits a schema-bound Rust crate. The generated SDK uses
|
|
120
|
+
Rust 1.88+ and the crates.io `type-bridge` runtime:
|
|
121
|
+
|
|
122
|
+
```toml
|
|
123
|
+
[dependencies]
|
|
124
|
+
type-bridge = "2"
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Follow the [Rust client guide](https://ds1sqe.github.io/type-bridge/guide/rust/)
|
|
128
|
+
for generation, direct execution, transactions, and remote queries.
|
|
129
|
+
|
|
130
|
+
## Documentation
|
|
131
|
+
|
|
132
|
+
- [Install a surface](https://ds1sqe.github.io/type-bridge/getting-started/installation/)
|
|
133
|
+
- [Model data in Split-YAML](https://ds1sqe.github.io/type-bridge/guide/models/)
|
|
134
|
+
- [Read and write generated models](https://ds1sqe.github.io/type-bridge/guide/data/)
|
|
135
|
+
- [Manage schemas and migrations](https://ds1sqe.github.io/type-bridge/guide/schema-workflows/)
|
|
136
|
+
- [Run the query server](https://ds1sqe.github.io/type-bridge/guide/server-container/)
|
|
137
|
+
- [Browse the Cargo package index](https://ds1sqe.github.io/type-bridge/guide/cargo-packages/)
|
|
138
|
+
- [Compatibility and removals](https://ds1sqe.github.io/type-bridge/guide/v2-deprecations/)
|
|
139
|
+
|
|
140
|
+
## Development
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 uv sync --extra dev
|
|
144
|
+
uv run pytest
|
|
145
|
+
./test.sh
|
|
146
|
+
./scripts/check.sh all
|
|
147
|
+
uv run --extra docs mkdocs build --strict
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
See [DEVELOPMENT.md](DEVELOPMENT.md) for repository boundaries and verification.
|
|
151
|
+
|
|
152
|
+
## License
|
|
153
|
+
|
|
154
|
+
TypeBridge-authored code is MIT licensed. Native artifacts also include
|
|
155
|
+
third-party TypeDB components under Apache-2.0 and MPL-2.0; exact notices ship
|
|
156
|
+
with each artifact.
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "type-bridge"
|
|
7
|
-
version = "2.0
|
|
7
|
+
version = "2.2.0"
|
|
8
8
|
description = "Typed Python, TypeScript, and Rust application tooling for TypeDB"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.12,<3.15"
|
|
@@ -30,7 +30,7 @@ dependencies = [
|
|
|
30
30
|
"jinja2>=3.1.0",
|
|
31
31
|
"typer>=0.15.0",
|
|
32
32
|
# The facade and native semantic engine are one release unit.
|
|
33
|
-
"type-bridge-core==2.0
|
|
33
|
+
"type-bridge-core==2.2.0",
|
|
34
34
|
"typing-extensions>=4.12",
|
|
35
35
|
]
|
|
36
36
|
|
|
@@ -55,10 +55,10 @@ dev = [
|
|
|
55
55
|
# server. The first native driver line supporting CPython 3.14 is band 9,
|
|
56
56
|
# so that interpreter has a dedicated native-constructor smoke; direct
|
|
57
57
|
# connections from that lane require a 3.12 server. The ORM itself uses
|
|
58
|
-
# the embedded Rust runtime and
|
|
59
|
-
#
|
|
58
|
+
# the embedded Rust runtime and serves TypeDB 3.11 and 3.12 on every
|
|
59
|
+
# supported interpreter.
|
|
60
60
|
"typedb-driver~=3.11.5; python_version < '3.14'",
|
|
61
|
-
"typedb-driver==3.12.
|
|
61
|
+
"typedb-driver==3.12.3; python_version >= '3.14'",
|
|
62
62
|
"pytest>=9.0.1",
|
|
63
63
|
"pytest-asyncio>=1.3.0",
|
|
64
64
|
"pytest-order>=1.2.0",
|
|
@@ -80,8 +80,8 @@ docs = [
|
|
|
80
80
|
"mkdocs-section-index>=0.3",
|
|
81
81
|
]
|
|
82
82
|
typedb-driver = [
|
|
83
|
-
"typedb-driver>=3.
|
|
84
|
-
"typedb-driver==3.12.
|
|
83
|
+
"typedb-driver>=3.11,<3.13; python_version < '3.14'",
|
|
84
|
+
"typedb-driver==3.12.3; python_version >= '3.14'",
|
|
85
85
|
]
|
|
86
86
|
|
|
87
87
|
[tool.ty.environment]
|
|
@@ -115,6 +115,9 @@ mypy_path = ["typings"]
|
|
|
115
115
|
line-length = 100
|
|
116
116
|
target-version = "py312"
|
|
117
117
|
|
|
118
|
+
[tool.ruff.format]
|
|
119
|
+
exclude = ["type-bridge-core/crates/schema-codegen/src/python/query.pyi"]
|
|
120
|
+
|
|
118
121
|
[tool.ruff.lint]
|
|
119
122
|
select = ["E", "F", "I", "N", "W", "UP"]
|
|
120
123
|
ignore = [
|
|
@@ -144,7 +147,6 @@ branch = true
|
|
|
144
147
|
omit = [
|
|
145
148
|
"type_bridge/__main__.py",
|
|
146
149
|
"type_bridge/migration/__main__.py",
|
|
147
|
-
"type_bridge/generator/__main__.py",
|
|
148
150
|
]
|
|
149
151
|
|
|
150
152
|
[tool.coverage.report]
|
|
@@ -163,6 +165,10 @@ precision = 2
|
|
|
163
165
|
[tool.coverage.html]
|
|
164
166
|
directory = "htmlcov"
|
|
165
167
|
|
|
168
|
+
[tool.uv]
|
|
169
|
+
# Keep mypy's wheel-only helper on a complete, verified release.
|
|
170
|
+
constraint-dependencies = ["ast-serialize==0.10.0"]
|
|
171
|
+
|
|
166
172
|
[tool.uv.workspace]
|
|
167
173
|
members = [
|
|
168
174
|
"type-bridge-core",
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"""Python SDK for generated TypeBridge applications and retained query APIs."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING, Any
|
|
6
|
+
|
|
7
|
+
from type_bridge.proxy import ProxyDatabase, ProxyError
|
|
8
|
+
from type_bridge.query import Query, QueryBuilder
|
|
9
|
+
from type_bridge.session import (
|
|
10
|
+
Connection,
|
|
11
|
+
Database,
|
|
12
|
+
TransactionContext,
|
|
13
|
+
)
|
|
14
|
+
from type_bridge.typedb_driver import Credentials, TransactionType, TypeDB, create_driver_options
|
|
15
|
+
|
|
16
|
+
if TYPE_CHECKING:
|
|
17
|
+
from type_bridge.crud.exceptions import (
|
|
18
|
+
EntityNotFoundError,
|
|
19
|
+
KeyAttributeError,
|
|
20
|
+
NotUniqueError,
|
|
21
|
+
RelationNotFoundError,
|
|
22
|
+
)
|
|
23
|
+
from type_bridge.crud.hooks import CrudEvent, CrudHook, HookCancelled
|
|
24
|
+
from type_bridge.migration.exceptions import SchemaConflictError, SchemaValidationError
|
|
25
|
+
from type_bridge.migration.introspection import SchemaIntrospector
|
|
26
|
+
|
|
27
|
+
__version__ = "2.2.0"
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
_LAZY_EXPORTS: dict[str, tuple[str, str]] = {
|
|
31
|
+
"CrudEvent": ("type_bridge.crud.hooks", "CrudEvent"),
|
|
32
|
+
"CrudHook": ("type_bridge.crud.hooks", "CrudHook"),
|
|
33
|
+
"HookCancelled": ("type_bridge.crud.hooks", "HookCancelled"),
|
|
34
|
+
"EntityNotFoundError": ("type_bridge.crud.exceptions", "EntityNotFoundError"),
|
|
35
|
+
"RelationNotFoundError": ("type_bridge.crud.exceptions", "RelationNotFoundError"),
|
|
36
|
+
"NotUniqueError": ("type_bridge.crud.exceptions", "NotUniqueError"),
|
|
37
|
+
"KeyAttributeError": ("type_bridge.crud.exceptions", "KeyAttributeError"),
|
|
38
|
+
"SchemaIntrospector": ("type_bridge.migration.introspection", "SchemaIntrospector"),
|
|
39
|
+
"SchemaConflictError": ("type_bridge.migration.exceptions", "SchemaConflictError"),
|
|
40
|
+
"SchemaValidationError": ("type_bridge.migration.exceptions", "SchemaValidationError"),
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def __getattr__(name: str) -> Any:
|
|
45
|
+
"""Load retained compatibility identities without importing authoring eagerly."""
|
|
46
|
+
target = _LAZY_EXPORTS.get(name)
|
|
47
|
+
if target is None:
|
|
48
|
+
from type_bridge.migration._archive_imports import archive_attribute
|
|
49
|
+
|
|
50
|
+
return archive_attribute(__name__, name)
|
|
51
|
+
|
|
52
|
+
from importlib import import_module
|
|
53
|
+
|
|
54
|
+
module_name, attribute_name = target
|
|
55
|
+
value = getattr(import_module(module_name), attribute_name)
|
|
56
|
+
globals()[name] = value
|
|
57
|
+
return value
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
__all__ = [
|
|
61
|
+
# Database and session
|
|
62
|
+
"Connection",
|
|
63
|
+
"Database",
|
|
64
|
+
"TransactionContext",
|
|
65
|
+
# TypeDB driver (re-exported for convenience)
|
|
66
|
+
"Credentials",
|
|
67
|
+
"TransactionType",
|
|
68
|
+
"TypeDB",
|
|
69
|
+
"create_driver_options",
|
|
70
|
+
# Query
|
|
71
|
+
"Query",
|
|
72
|
+
"QueryBuilder",
|
|
73
|
+
# Hooks
|
|
74
|
+
"CrudEvent",
|
|
75
|
+
"CrudHook",
|
|
76
|
+
"HookCancelled",
|
|
77
|
+
# Proxy
|
|
78
|
+
"ProxyDatabase",
|
|
79
|
+
"ProxyError",
|
|
80
|
+
# CRUD Exceptions
|
|
81
|
+
"EntityNotFoundError",
|
|
82
|
+
"RelationNotFoundError",
|
|
83
|
+
"NotUniqueError",
|
|
84
|
+
"KeyAttributeError",
|
|
85
|
+
# Schema
|
|
86
|
+
"SchemaIntrospector",
|
|
87
|
+
# Schema exceptions
|
|
88
|
+
"SchemaConflictError",
|
|
89
|
+
"SchemaValidationError",
|
|
90
|
+
]
|
|
@@ -13,7 +13,7 @@ RUST_BACKEND = "rust"
|
|
|
13
13
|
def selected_backend() -> str:
|
|
14
14
|
"""Return the configured manager backend.
|
|
15
15
|
|
|
16
|
-
The Python ORM backend was retired in #125
|
|
16
|
+
The Python ORM backend was retired in #125. The environment
|
|
17
17
|
variable is retained only to reject stale transition settings clearly.
|
|
18
18
|
"""
|
|
19
19
|
value = os.environ.get(BACKEND_ENV_VAR, RUST_BACKEND).strip().lower()
|
|
@@ -33,6 +33,6 @@ def manager_class(default_manager: type[Any]) -> type[Any]:
|
|
|
33
33
|
if default_manager.__name__ == "RustTypeDBManager":
|
|
34
34
|
return default_manager
|
|
35
35
|
|
|
36
|
-
from type_bridge.crud.rust_manager import
|
|
36
|
+
from type_bridge.crud.rust_manager import _QueryRustTypeDBManager
|
|
37
37
|
|
|
38
|
-
return
|
|
38
|
+
return _QueryRustTypeDBManager
|