runic-py 0.3.3__tar.gz → 0.3.4__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 (73) hide show
  1. {runic_py-0.3.3 → runic_py-0.3.4}/PKG-INFO +12 -12
  2. {runic_py-0.3.3 → runic_py-0.3.4}/README.md +10 -10
  3. {runic_py-0.3.3 → runic_py-0.3.4}/pyproject.toml +3 -3
  4. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/adapters/__init__.py +1 -1
  5. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/adapters/_base.py +1 -1
  6. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/adapters/age.py +5 -5
  7. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/adapters/arcadedb.py +3 -3
  8. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/adapters/falkordb.py +4 -4
  9. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/adapters/memgraph.py +4 -4
  10. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/adapters/neo4j.py +4 -4
  11. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/operations.py +2 -2
  12. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/schema.py +3 -3
  13. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/__init__.py +24 -24
  14. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/core/descriptors.py +6 -6
  15. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/core/metadata.py +1 -1
  16. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/core/models.py +4 -4
  17. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/driver/__init__.py +3 -3
  18. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/driver/age.py +5 -5
  19. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/driver/arcadedb.py +3 -3
  20. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/driver/bolt.py +3 -3
  21. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/driver/factory.py +7 -7
  22. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/driver/falkordb.py +1 -1
  23. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/driver/memgraph.py +4 -4
  24. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/driver/neo4j.py +4 -4
  25. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/exceptions.py +1 -1
  26. runic_py-0.3.4/runic/ogm/mapper/__init__.py +5 -0
  27. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/mapper/mapper.py +15 -15
  28. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/mapper/relationship_loader.py +4 -4
  29. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/mapper/relationship_writer.py +5 -5
  30. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/operations.py +2 -2
  31. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/query/__init__.py +13 -13
  32. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/query/_compiler.py +5 -5
  33. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/query/_decoder.py +6 -6
  34. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/query/builder.py +28 -28
  35. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/query/expressions.py +7 -7
  36. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/query/specialised.py +8 -8
  37. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/query/traversal.py +3 -3
  38. runic_py-0.3.4/runic/ogm/repository/__init__.py +9 -0
  39. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/repository/async_repository.py +8 -8
  40. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/repository/cypher.py +1 -1
  41. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/repository/repository.py +7 -7
  42. runic_py-0.3.4/runic/ogm/schema/__init__.py +8 -0
  43. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/session/_base.py +7 -7
  44. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/session/async_session.py +25 -25
  45. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/session/connection_pool.py +3 -3
  46. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/session/session.py +31 -31
  47. runic_py-0.3.3/runic/orm/mapper/__init__.py +0 -5
  48. runic_py-0.3.3/runic/orm/repository/__init__.py +0 -9
  49. runic_py-0.3.3/runic/orm/schema/__init__.py +0 -8
  50. {runic_py-0.3.3 → runic_py-0.3.4}/.gitignore +0 -0
  51. {runic_py-0.3.3 → runic_py-0.3.4}/LICENSE.md +0 -0
  52. {runic_py-0.3.3 → runic_py-0.3.4}/runic/__init__.py +0 -0
  53. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/__init__.py +0 -0
  54. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/autogen.py +0 -0
  55. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/checksum.py +0 -0
  56. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/cli.py +0 -0
  57. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/config.py +0 -0
  58. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/context.py +0 -0
  59. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/exceptions.py +0 -0
  60. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/introspect.py +0 -0
  61. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/manifest.py +0 -0
  62. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/script.py +0 -0
  63. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/service.py +0 -0
  64. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/templates/env.py.mako +0 -0
  65. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/templates/script.py.mako +0 -0
  66. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/testing.py +0 -0
  67. {runic_py-0.3.3 → runic_py-0.3.4}/runic/migrate/version.py +0 -0
  68. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/core/__init__.py +0 -0
  69. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/core/types.py +0 -0
  70. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/repository/_base.py +0 -0
  71. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/repository/protocol.py +0 -0
  72. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/schema/index_manager.py +0 -0
  73. {runic_py-0.3.3/runic/orm → runic_py-0.3.4/runic/ogm}/session/__init__.py +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: runic-py
3
- Version: 0.3.3
4
- Summary: Graph schema migrations and ORM for Cypher-based graph databases.
3
+ Version: 0.3.4
4
+ Summary: Graph schema migrations and OGM for Cypher-based graph databases.
5
5
  Project-URL: Homepage, https://runic-py.readthedocs.io/en/latest/
6
6
  Project-URL: Repository, https://github.com/jenreh/runic
7
7
  Author: Jens Rehpöhler
@@ -40,9 +40,9 @@ Description-Content-Type: text/markdown
40
40
 
41
41
  # Runic
42
42
 
43
- **Graph schema migrations and ORM for Cypher-based graph databases.**
43
+ **Graph schema migrations and OGM for Cypher-based graph databases.**
44
44
 
45
- ![Version](https://img.shields.io/badge/version-0.3.3-blue)
45
+ ![Version](https://img.shields.io/badge/version-0.3.4-blue)
46
46
  [![PyPI](https://img.shields.io/pypi/v/runic-py.svg)](https://pypi.org/project/runic-py/)
47
47
  [![Python](https://img.shields.io/badge/python-3.14%2B-orange)](https://www.python.org)
48
48
  [![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE.md)
@@ -56,7 +56,7 @@ Description-Content-Type: text/markdown
56
56
  **Runic** is a Python toolkit for Cypher-based graph databases that covers two layers:
57
57
 
58
58
  - **`runic.migrate`** — Alembic-style schema migrations with revision tracking, a CLI, and rollback snapshots.
59
- - **`runic.orm`** — A lightweight graph ORM: declare `Node` and `Edge` models, manage sessions, traverse relationships, and sync indexes — all via a pluggable driver layer supporting FalkorDB, ArcadeDB, and any Bolt-compatible database.
59
+ - **`runic.ogm`** — A lightweight graph OGM: declare `Node` and `Edge` models, manage sessions, traverse relationships, and sync indexes — all via a pluggable driver layer supporting FalkorDB, ArcadeDB, and any Bolt-compatible database.
60
60
 
61
61
  ## Features
62
62
 
@@ -184,12 +184,12 @@ print("current:", runic.migrate.current())
184
184
 
185
185
  ---
186
186
 
187
- ## runic.orm
187
+ ## runic.ogm
188
188
 
189
189
  ### Defining models
190
190
 
191
191
  ```python
192
- from runic.orm import Field, Node, Edge, Relation
192
+ from runic.ogm import Field, Node, Edge, Relation
193
193
 
194
194
 
195
195
  class User(Node, labels=["User"]):
@@ -224,7 +224,7 @@ class Author(Node, labels=["Author"]):
224
224
  `Session` accepts any `GraphDriver`. Use `create_driver()` to build one for your backend:
225
225
 
226
226
  ```python
227
- from runic.orm import Session, Repository, create_driver
227
+ from runic.ogm import Session, Repository, create_driver
228
228
 
229
229
  # Pick your backend — the rest of the code is identical
230
230
  driver = create_driver("falkordb", host="localhost", port=6379, graph="myapp")
@@ -265,7 +265,7 @@ with Session(driver) as session:
265
265
  ### Pagination and custom queries
266
266
 
267
267
  ```python
268
- from runic.orm import Repository
268
+ from runic.ogm import Repository
269
269
 
270
270
  with Session(driver) as session:
271
271
  repo = Repository(session, User)
@@ -291,7 +291,7 @@ class UserRepository(Repository[User]):
291
291
  dynamic query composition (e.g. conditional UI filters) before execution:
292
292
 
293
293
  ```python
294
- from runic.orm import select
294
+ from runic.ogm import select
295
295
 
296
296
  stmt = select(User).where(User.active == True)
297
297
  if min_age > 0:
@@ -312,7 +312,7 @@ still fully supported.
312
312
  Declare indexes inline on `Field`, then let `SchemaManager` keep the live graph in sync:
313
313
 
314
314
  ```python
315
- from runic.orm import Field, IndexManager, Node, SchemaManager
315
+ from runic.ogm import Field, IndexManager, Node, SchemaManager
316
316
 
317
317
 
318
318
  class Place(Node, labels=["Place"]):
@@ -337,7 +337,7 @@ print("valid:", result.is_valid)
337
337
  ```python
338
338
  from datetime import UTC, datetime
339
339
  from enum import StrEnum
340
- from runic.orm import Field, GeoLocation, Node, Vector
340
+ from runic.ogm import Field, GeoLocation, Node, Vector
341
341
 
342
342
 
343
343
  class Status(StrEnum):
@@ -3,9 +3,9 @@
3
3
 
4
4
  # Runic
5
5
 
6
- **Graph schema migrations and ORM for Cypher-based graph databases.**
6
+ **Graph schema migrations and OGM for Cypher-based graph databases.**
7
7
 
8
- ![Version](https://img.shields.io/badge/version-0.3.3-blue)
8
+ ![Version](https://img.shields.io/badge/version-0.3.4-blue)
9
9
  [![PyPI](https://img.shields.io/pypi/v/runic-py.svg)](https://pypi.org/project/runic-py/)
10
10
  [![Python](https://img.shields.io/badge/python-3.14%2B-orange)](https://www.python.org)
11
11
  [![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE.md)
@@ -19,7 +19,7 @@
19
19
  **Runic** is a Python toolkit for Cypher-based graph databases that covers two layers:
20
20
 
21
21
  - **`runic.migrate`** — Alembic-style schema migrations with revision tracking, a CLI, and rollback snapshots.
22
- - **`runic.orm`** — A lightweight graph ORM: declare `Node` and `Edge` models, manage sessions, traverse relationships, and sync indexes — all via a pluggable driver layer supporting FalkorDB, ArcadeDB, and any Bolt-compatible database.
22
+ - **`runic.ogm`** — A lightweight graph OGM: declare `Node` and `Edge` models, manage sessions, traverse relationships, and sync indexes — all via a pluggable driver layer supporting FalkorDB, ArcadeDB, and any Bolt-compatible database.
23
23
 
24
24
  ## Features
25
25
 
@@ -147,12 +147,12 @@ print("current:", runic.migrate.current())
147
147
 
148
148
  ---
149
149
 
150
- ## runic.orm
150
+ ## runic.ogm
151
151
 
152
152
  ### Defining models
153
153
 
154
154
  ```python
155
- from runic.orm import Field, Node, Edge, Relation
155
+ from runic.ogm import Field, Node, Edge, Relation
156
156
 
157
157
 
158
158
  class User(Node, labels=["User"]):
@@ -187,7 +187,7 @@ class Author(Node, labels=["Author"]):
187
187
  `Session` accepts any `GraphDriver`. Use `create_driver()` to build one for your backend:
188
188
 
189
189
  ```python
190
- from runic.orm import Session, Repository, create_driver
190
+ from runic.ogm import Session, Repository, create_driver
191
191
 
192
192
  # Pick your backend — the rest of the code is identical
193
193
  driver = create_driver("falkordb", host="localhost", port=6379, graph="myapp")
@@ -228,7 +228,7 @@ with Session(driver) as session:
228
228
  ### Pagination and custom queries
229
229
 
230
230
  ```python
231
- from runic.orm import Repository
231
+ from runic.ogm import Repository
232
232
 
233
233
  with Session(driver) as session:
234
234
  repo = Repository(session, User)
@@ -254,7 +254,7 @@ class UserRepository(Repository[User]):
254
254
  dynamic query composition (e.g. conditional UI filters) before execution:
255
255
 
256
256
  ```python
257
- from runic.orm import select
257
+ from runic.ogm import select
258
258
 
259
259
  stmt = select(User).where(User.active == True)
260
260
  if min_age > 0:
@@ -275,7 +275,7 @@ still fully supported.
275
275
  Declare indexes inline on `Field`, then let `SchemaManager` keep the live graph in sync:
276
276
 
277
277
  ```python
278
- from runic.orm import Field, IndexManager, Node, SchemaManager
278
+ from runic.ogm import Field, IndexManager, Node, SchemaManager
279
279
 
280
280
 
281
281
  class Place(Node, labels=["Place"]):
@@ -300,7 +300,7 @@ print("valid:", result.is_valid)
300
300
  ```python
301
301
  from datetime import UTC, datetime
302
302
  from enum import StrEnum
303
- from runic.orm import Field, GeoLocation, Node, Vector
303
+ from runic.ogm import Field, GeoLocation, Node, Vector
304
304
 
305
305
 
306
306
  class Status(StrEnum):
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "runic-py"
3
- version = "0.3.3"
4
- description = "Graph schema migrations and ORM for Cypher-based graph databases."
3
+ version = "0.3.4"
4
+ description = "Graph schema migrations and OGM for Cypher-based graph databases."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.14"
7
7
  license = { text = "MIT" }
@@ -93,7 +93,7 @@ exclude = [
93
93
 
94
94
  [tool.bumpversion]
95
95
  commit = false
96
- current_version = "0.3.3"
96
+ current_version = "0.3.4"
97
97
  tag = false
98
98
  allow-dirty = false
99
99
 
@@ -21,7 +21,7 @@ class GraphAdapter(Protocol):
21
21
  @property
22
22
  def name(self) -> str: ...
23
23
 
24
- # Normalised query execution (satisfies runic.orm.operations._Executor)
24
+ # Normalised query execution (satisfies runic.ogm.operations._Executor)
25
25
  def execute(self, cypher: str, params: dict[str, Any]) -> Any: ...
26
26
 
27
27
  # Low-level query execution
@@ -12,7 +12,7 @@ from abc import ABC, abstractmethod
12
12
  from typing import Any, Protocol, runtime_checkable
13
13
 
14
14
  from runic.migrate.introspect import LiveSchema, SchemaSnapshot
15
- from runic.orm.schema.index_manager import IndexSpec
15
+ from runic.ogm.schema.index_manager import IndexSpec
16
16
 
17
17
  log = logging.getLogger(__name__)
18
18
 
@@ -3,7 +3,7 @@
3
3
  Apache AGE stores graph data inside PostgreSQL, so migration version-tracking
4
4
  nodes are created as AGE vertices (not PostgreSQL tables). The adapter
5
5
  executes Cypher through the AGE ``cypher()`` SQL function and delegates
6
- agtype decoding to the :mod:`runic.orm.driver.age` module.
6
+ agtype decoding to the :mod:`runic.ogm.driver.age` module.
7
7
  """
8
8
 
9
9
  from __future__ import annotations
@@ -13,8 +13,8 @@ from typing import Any
13
13
 
14
14
  from runic.migrate.adapters import GraphAdapter
15
15
  from runic.migrate.adapters._base import GraphAdapterBase
16
- from runic.orm.driver.age import AGEDriver
17
- from runic.orm.schema.index_manager import IndexSpec
16
+ from runic.ogm.driver.age import AGEDriver
17
+ from runic.ogm.schema.index_manager import IndexSpec
18
18
 
19
19
  log = logging.getLogger(__name__)
20
20
 
@@ -40,7 +40,7 @@ class AGEAdapter(GraphAdapterBase, GraphAdapter):
40
40
  username: str = "postgres",
41
41
  password: str = "", # noqa: S107
42
42
  ) -> AGEAdapter:
43
- from runic.orm.driver.age import create_age_driver
43
+ from runic.ogm.driver.age import create_age_driver
44
44
 
45
45
  driver = create_age_driver(
46
46
  host=host,
@@ -64,7 +64,7 @@ class AGEAdapter(GraphAdapterBase, GraphAdapter):
64
64
  def run_query(self, query: str, params: dict | None = None) -> Any:
65
65
  result = self._driver.execute(query, params or {})
66
66
  # AGEDriver no longer auto-commits; the adapter owns the transaction
67
- # lifecycle for write operations (not managed by an ORM Session here).
67
+ # lifecycle for write operations (not managed by an OGM Session here).
68
68
  self._driver.commit()
69
69
  return result
70
70
 
@@ -7,9 +7,9 @@ from typing import Any
7
7
 
8
8
  from runic.migrate.adapters import GraphAdapter
9
9
  from runic.migrate.adapters._base import GraphAdapterBase
10
- from runic.orm.driver.arcadedb import ArcadeDBDialect
11
- from runic.orm.driver.bolt import BoltDriver
12
- from runic.orm.schema.index_manager import IndexSpec
10
+ from runic.ogm.driver.arcadedb import ArcadeDBDialect
11
+ from runic.ogm.driver.bolt import BoltDriver
12
+ from runic.ogm.schema.index_manager import IndexSpec
13
13
 
14
14
  log = logging.getLogger(__name__)
15
15
 
@@ -10,8 +10,8 @@ from runic.migrate.adapters._base import _encode_kv_list, _parse_kv_list
10
10
  from runic.migrate.exceptions import ConstraintFailedError, ConstraintTimeoutError
11
11
  from runic.migrate.introspect import LiveSchema
12
12
  from runic.migrate.manifest import UniqueConstraint
13
- from runic.orm.driver.falkordb import FalkorDBDriver, FalkorDBResult
14
- from runic.orm.schema.index_manager import IndexSpec
13
+ from runic.ogm.driver.falkordb import FalkorDBDriver, FalkorDBResult
14
+ from runic.ogm.schema.index_manager import IndexSpec
15
15
 
16
16
  log = logging.getLogger(__name__)
17
17
 
@@ -34,7 +34,7 @@ _SET_TRACKING_QUERY = (
34
34
  class FalkorDBAdapter(GraphAdapter):
35
35
  """GraphAdapter implementation for FalkorDB (standalone or embedded via falkordblite).
36
36
 
37
- Query execution is routed through :class:`~runic.orm.driver.falkordb.FalkorDBDriver`
37
+ Query execution is routed through :class:`~runic.ogm.driver.falkordb.FalkorDBDriver`
38
38
  so results are normalised to ``GraphResult.rows`` — consistent with Bolt adapters.
39
39
  The raw ``db`` and ``graph`` references are kept only for FalkorDB-specific migration
40
40
  operations (constraint DDL via Redis commands, snapshot copy/delete).
@@ -97,7 +97,7 @@ class FalkorDBAdapter(GraphAdapter):
97
97
  return self._graph.name # type: ignore[no-any-return]
98
98
 
99
99
  def execute(self, cypher: str, params: dict[str, Any]) -> FalkorDBResult:
100
- """Normalised query execution via ORM driver (result has .rows)."""
100
+ """Normalised query execution via OGM driver (result has .rows)."""
101
101
  return self._driver.execute(cypher, params)
102
102
 
103
103
  def run_query(self, query: str, params: dict | None = None) -> FalkorDBResult:
@@ -7,9 +7,9 @@ from typing import Any
7
7
 
8
8
  from runic.migrate.adapters import GraphAdapter
9
9
  from runic.migrate.adapters._base import GraphAdapterBase
10
- from runic.orm.driver.bolt import BoltDriver
11
- from runic.orm.driver.memgraph import _MEMGRAPH_DIALECT, MemgraphDialect
12
- from runic.orm.schema.index_manager import IndexSpec
10
+ from runic.ogm.driver.bolt import BoltDriver
11
+ from runic.ogm.driver.memgraph import _MEMGRAPH_DIALECT, MemgraphDialect
12
+ from runic.ogm.schema.index_manager import IndexSpec
13
13
 
14
14
  log = logging.getLogger(__name__)
15
15
 
@@ -17,7 +17,7 @@ log = logging.getLogger(__name__)
17
17
  class MemgraphAdapter(GraphAdapterBase, GraphAdapter):
18
18
  """Migration adapter for Memgraph accessed via Bolt protocol.
19
19
 
20
- Named index convention (must match :class:`~runic.orm.driver.memgraph.MemgraphDialect`):
20
+ Named index convention (must match :class:`~runic.ogm.driver.memgraph.MemgraphDialect`):
21
21
 
22
22
  - **Fulltext** (text search) index name = ``{label}`` (e.g. ``Post``)
23
23
  - **Vector** index name = ``{label}_{prop}`` (e.g. ``Article_embedding``)
@@ -7,9 +7,9 @@ from typing import Any
7
7
 
8
8
  from runic.migrate.adapters import GraphAdapter
9
9
  from runic.migrate.adapters._base import GraphAdapterBase
10
- from runic.orm.driver.bolt import BoltDriver
11
- from runic.orm.driver.neo4j import _NEO4J_DIALECT, Neo4jDialect
12
- from runic.orm.schema.index_manager import IndexSpec
10
+ from runic.ogm.driver.bolt import BoltDriver
11
+ from runic.ogm.driver.neo4j import _NEO4J_DIALECT, Neo4jDialect
12
+ from runic.ogm.schema.index_manager import IndexSpec
13
13
 
14
14
  log = logging.getLogger(__name__)
15
15
 
@@ -17,7 +17,7 @@ log = logging.getLogger(__name__)
17
17
  class Neo4jAdapter(GraphAdapterBase, GraphAdapter):
18
18
  """Migration adapter for Neo4j 5.x accessed via Bolt protocol.
19
19
 
20
- Named index convention (must match :class:`~runic.orm.driver.neo4j.Neo4jDialect`):
20
+ Named index convention (must match :class:`~runic.ogm.driver.neo4j.Neo4jDialect`):
21
21
 
22
22
  - **Fulltext** index name = ``{label}`` (e.g. ``Post``)
23
23
  - **Vector** index name = ``{label}_{prop}`` (e.g. ``Article_embedding``)
@@ -3,7 +3,7 @@ from __future__ import annotations
3
3
  import logging
4
4
  from typing import TYPE_CHECKING
5
5
 
6
- from runic.orm.operations import DataOperations
6
+ from runic.ogm.operations import DataOperations
7
7
 
8
8
  if TYPE_CHECKING:
9
9
  from runic.migrate.adapters import GraphAdapter
@@ -14,7 +14,7 @@ log = logging.getLogger(__name__)
14
14
  class GraphOperations(DataOperations):
15
15
  """Migration-script API: data manipulation + DDL, both with preview mode.
16
16
 
17
- Extends :class:`~runic.orm.operations.DataOperations` with DDL operations
17
+ Extends :class:`~runic.ogm.operations.DataOperations` with DDL operations
18
18
  (indexes, constraints, snapshots) that delegate to the underlying adapter.
19
19
 
20
20
  Migration scripts receive this object as their ``ops`` argument::
@@ -6,7 +6,7 @@ import logging
6
6
  from dataclasses import dataclass, field
7
7
  from typing import Any
8
8
 
9
- from runic.orm.schema.index_manager import IndexSpec, extract_declared_specs
9
+ from runic.ogm.schema.index_manager import IndexSpec, extract_declared_specs
10
10
 
11
11
  log = logging.getLogger(__name__)
12
12
 
@@ -138,7 +138,7 @@ class IndexManager:
138
138
  When *if_not_exists* is ``True`` (default), existing non-FULLTEXT specs are
139
139
  skipped. FULLTEXT creation is always attempted — adapters must handle idempotency.
140
140
  """
141
- from runic.orm.core.models import Edge, Node
141
+ from runic.ogm.core.models import Edge, Node
142
142
 
143
143
  if issubclass(entity_class, Node):
144
144
  label: str = getattr(entity_class, "_primary_label", entity_class.__name__)
@@ -252,7 +252,7 @@ class SchemaManager:
252
252
  No-op for schemaless backends. Issues ``CREATE VERTEX TYPE`` / ``CREATE EDGE TYPE``
253
253
  DDL for ArcadeDB.
254
254
  """
255
- from runic.orm.core.models import Edge, Node
255
+ from runic.ogm.core.models import Edge, Node
256
256
 
257
257
  for cls in entity_classes:
258
258
  if issubclass(cls, Node):
@@ -1,25 +1,25 @@
1
- """runic.orm — lightweight graph ORM for Cypher-based graph databases."""
1
+ """runic.ogm — lightweight graph OGM for Cypher-based graph databases."""
2
2
 
3
- from runic.orm.driver import (
3
+ from runic.ogm.driver import (
4
4
  AsyncGraphDriver,
5
5
  GraphDialect,
6
6
  GraphDriver,
7
7
  GraphResult,
8
8
  TransactionalGraphDriver,
9
9
  )
10
- from runic.orm.driver.age import AGEDialect, AGEDriver, create_age_driver
11
- from runic.orm.driver.arcadedb import ArcadeDBDialect, create_arcadedb_driver
12
- from runic.orm.driver.bolt import BoltDriver
13
- from runic.orm.driver.factory import create_driver
14
- from runic.orm.driver.falkordb import (
10
+ from runic.ogm.driver.age import AGEDialect, AGEDriver, create_age_driver
11
+ from runic.ogm.driver.arcadedb import ArcadeDBDialect, create_arcadedb_driver
12
+ from runic.ogm.driver.bolt import BoltDriver
13
+ from runic.ogm.driver.factory import create_driver
14
+ from runic.ogm.driver.falkordb import (
15
15
  AsyncFalkorDBDriver,
16
16
  FalkorDBDialect,
17
17
  FalkorDBDriver,
18
18
  create_falkordb_driver,
19
19
  )
20
- from runic.orm.driver.memgraph import MemgraphDialect, create_memgraph_driver
21
- from runic.orm.driver.neo4j import Neo4jDialect, create_neo4j_driver
22
- from runic.orm.core.descriptors import (
20
+ from runic.ogm.driver.memgraph import MemgraphDialect, create_memgraph_driver
21
+ from runic.ogm.driver.neo4j import Neo4jDialect, create_neo4j_driver
22
+ from runic.ogm.core.descriptors import (
23
23
  MISSING,
24
24
  Field,
25
25
  FieldDescriptor,
@@ -27,9 +27,9 @@ from runic.orm.core.descriptors import (
27
27
  Relation,
28
28
  _NOT_LOADED,
29
29
  )
30
- from runic.orm.core.metadata import EdgeMeta, MetaData, NodeMeta, get_metadata, metadata
31
- from runic.orm.core.models import Edge, Node
32
- from runic.orm.core.types import (
30
+ from runic.ogm.core.metadata import EdgeMeta, MetaData, NodeMeta, get_metadata, metadata
31
+ from runic.ogm.core.models import Edge, Node
32
+ from runic.ogm.core.types import (
33
33
  DatetimeConverter,
34
34
  EnumConverter,
35
35
  GeoLocation,
@@ -38,7 +38,7 @@ from runic.orm.core.types import (
38
38
  Vector,
39
39
  VectorConverter,
40
40
  )
41
- from runic.orm.exceptions import (
41
+ from runic.ogm.exceptions import (
42
42
  DetachedEntityError,
43
43
  EntityNotFoundError,
44
44
  FieldValidationError,
@@ -46,11 +46,11 @@ from runic.orm.exceptions import (
46
46
  MetadataError,
47
47
  OrmError,
48
48
  )
49
- from runic.orm.mapper.mapper import Mapper
50
- from runic.orm.mapper.relationship_loader import RelationshipLoader
51
- from runic.orm.repository.async_repository import AsyncRepository
52
- from runic.orm.repository.repository import Repository
53
- from runic.orm.query import (
49
+ from runic.ogm.mapper.mapper import Mapper
50
+ from runic.ogm.mapper.relationship_loader import RelationshipLoader
51
+ from runic.ogm.repository.async_repository import AsyncRepository
52
+ from runic.ogm.repository.repository import Repository
53
+ from runic.ogm.query import (
54
54
  AsyncQueryBuilder,
55
55
  FulltextQueryBuilder,
56
56
  QueryBuilder,
@@ -63,7 +63,7 @@ from runic.orm.query import (
63
63
  select,
64
64
  sum_,
65
65
  )
66
- from runic.orm.query.expressions import (
66
+ from runic.ogm.query.expressions import (
67
67
  AggExpr,
68
68
  CompoundExpr,
69
69
  Expr,
@@ -71,10 +71,10 @@ from runic.orm.query.expressions import (
71
71
  NegatedExpr,
72
72
  OrderExpr,
73
73
  )
74
- from runic.orm.schema.index_manager import IndexSpec
75
- from runic.orm.session.async_session import AsyncSession
76
- from runic.orm.session.connection_pool import AsyncConnectionManager, ConnectionManager
77
- from runic.orm.session.session import Session
74
+ from runic.ogm.schema.index_manager import IndexSpec
75
+ from runic.ogm.session.async_session import AsyncSession
76
+ from runic.ogm.session.connection_pool import AsyncConnectionManager, ConnectionManager
77
+ from runic.ogm.session.session import Session
78
78
 
79
79
  __all__ = [ # noqa: RUF022
80
80
  # Driver / dialect
@@ -7,7 +7,7 @@ from collections.abc import Callable
7
7
  from typing import TYPE_CHECKING, Any, Literal, overload
8
8
 
9
9
  if TYPE_CHECKING:
10
- from runic.orm.core.types import TypeConverter
10
+ from runic.ogm.core.types import TypeConverter
11
11
 
12
12
  log = logging.getLogger(__name__)
13
13
 
@@ -43,8 +43,8 @@ class FieldDescriptor:
43
43
  --------------------------
44
44
  When accessed at the **class level** (``User.name``, ``Rated.score``),
45
45
  the descriptor returns itself. The comparison operators defined below
46
- produce :class:`~runic.orm.query.expressions.FilterExpr` objects for use
47
- with :meth:`~runic.orm.query.builder.QueryBuilder.where`:
46
+ produce :class:`~runic.ogm.query.expressions.FilterExpr` objects for use
47
+ with :meth:`~runic.ogm.query.builder.QueryBuilder.where`:
48
48
 
49
49
  .. code-block:: python
50
50
 
@@ -159,7 +159,7 @@ class FieldDescriptor:
159
159
 
160
160
  session_ref = obj.__dict__.get("_session")
161
161
  if session_ref is None:
162
- from runic.orm.exceptions import DetachedEntityError
162
+ from runic.ogm.exceptions import DetachedEntityError
163
163
 
164
164
  raise DetachedEntityError(
165
165
  f"Entity {obj!r} has no active session. "
@@ -167,7 +167,7 @@ class FieldDescriptor:
167
167
  )
168
168
  session = session_ref() if isinstance(session_ref, weakref.ref) else session_ref
169
169
  if session is None:
170
- from runic.orm.exceptions import DetachedEntityError
170
+ from runic.ogm.exceptions import DetachedEntityError
171
171
 
172
172
  raise DetachedEntityError(
173
173
  f"Entity {obj!r}'s session was garbage-collected. "
@@ -228,7 +228,7 @@ class FieldDescriptor:
228
228
  __hash__ = object.__hash__ # type: ignore[assignment]
229
229
 
230
230
  def _make_filter(self, op: str, value: Any, negate: bool = False) -> Any:
231
- from runic.orm.query.expressions import FilterExpr
231
+ from runic.ogm.query.expressions import FilterExpr
232
232
 
233
233
  return FilterExpr(
234
234
  cls=self._owner or type(self),
@@ -5,7 +5,7 @@ from __future__ import annotations
5
5
  import logging
6
6
  from dataclasses import dataclass, field
7
7
 
8
- from runic.orm.core.descriptors import FieldDescriptor, FieldInfo
8
+ from runic.ogm.core.descriptors import FieldDescriptor, FieldInfo
9
9
 
10
10
  log = logging.getLogger(__name__)
11
11
 
@@ -9,8 +9,8 @@ from datetime import datetime
9
9
  from enum import Enum
10
10
  from typing import Any, ClassVar, dataclass_transform
11
11
 
12
- from runic.orm.core.descriptors import Field, FieldDescriptor, FieldInfo
13
- from runic.orm.core.types import (
12
+ from runic.ogm.core.descriptors import Field, FieldDescriptor, FieldInfo
13
+ from runic.ogm.core.types import (
14
14
  DatetimeConverter,
15
15
  EnumConverter,
16
16
  GeoLocation,
@@ -232,7 +232,7 @@ class Node:
232
232
  _apply_auto_converters(cls, cls._fields)
233
233
  cls.__init__ = _make_init(cls._fields) # ty:ignore[invalid-assignment]
234
234
 
235
- from runic.orm.core.metadata import metadata
235
+ from runic.ogm.core.metadata import metadata
236
236
 
237
237
  metadata.register_node(cls)
238
238
  log.debug("Node subclass registered: %s", cls.__name__)
@@ -292,7 +292,7 @@ class Edge:
292
292
  _apply_auto_converters(cls, cls._fields)
293
293
  cls.__init__ = _make_init(cls._fields) # ty:ignore[invalid-assignment]
294
294
 
295
- from runic.orm.core.metadata import metadata
295
+ from runic.ogm.core.metadata import metadata
296
296
 
297
297
  metadata.register_edge(cls)
298
298
  log.debug("Edge subclass registered: %s", cls.__name__)
@@ -1,11 +1,11 @@
1
- """runic.orm.driver — database driver and dialect Protocols (ISP-compliant)."""
1
+ """runic.ogm.driver — database driver and dialect Protocols (ISP-compliant)."""
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import TYPE_CHECKING, Any, Protocol, runtime_checkable
6
6
 
7
7
  if TYPE_CHECKING:
8
- from runic.orm.core.descriptors import FieldInfo
8
+ from runic.ogm.core.descriptors import FieldInfo
9
9
 
10
10
 
11
11
  class GraphNode(Protocol):
@@ -91,7 +91,7 @@ class TransactionalGraphDriver(Protocol):
91
91
  """Sync driver that supports explicit ACID transactions.
92
92
 
93
93
  Drivers that implement this protocol (BoltDriver, AGEDriver) allow the
94
- ORM Session to wrap multi-query operations in a single database transaction.
94
+ OGM Session to wrap multi-query operations in a single database transaction.
95
95
 
96
96
  Drivers without native transaction support (FalkorDB) do NOT implement
97
97
  this protocol — each query is individually atomic at the DB level.
@@ -22,7 +22,7 @@ import re
22
22
  from typing import TYPE_CHECKING, Any
23
23
 
24
24
  if TYPE_CHECKING:
25
- from runic.orm.core.descriptors import FieldInfo
25
+ from runic.ogm.core.descriptors import FieldInfo
26
26
 
27
27
  log = logging.getLogger(__name__)
28
28
 
@@ -440,14 +440,14 @@ class AGEDriver:
440
440
  ``cypher()``, making them accessible inside Cypher as ``$param_name``.
441
441
 
442
442
  Supports explicit ACID transactions via
443
- :class:`~runic.orm.driver.TransactionalGraphDriver`. psycopg3 starts an
443
+ :class:`~runic.ogm.driver.TransactionalGraphDriver`. psycopg3 starts an
444
444
  implicit ``BEGIN`` on the first statement after each commit/rollback
445
445
  (``autocommit=False`` default); this driver's ``commit()`` / ``rollback()``
446
446
  map directly to ``conn.commit()`` / ``conn.rollback()``. ``begin()`` is a
447
447
  documented no-op because psycopg3 manages the implicit transaction start
448
448
  automatically.
449
449
 
450
- The ORM :class:`~runic.orm.session.session.Session` drives this lifecycle:
450
+ The OGM :class:`~runic.ogm.session.session.Session` drives this lifecycle:
451
451
  the first query in a Session opens a transaction implicitly; ``commit()`` /
452
452
  ``rollback()`` finalise it.
453
453
 
@@ -488,8 +488,8 @@ class AGEDriver:
488
488
  def begin(self) -> None:
489
489
  """No-op: psycopg3 starts an implicit BEGIN on the first statement.
490
490
 
491
- Exists to satisfy the :class:`~runic.orm.driver.TransactionalGraphDriver`
492
- protocol so the ORM Session can detect transaction support via
491
+ Exists to satisfy the :class:`~runic.ogm.driver.TransactionalGraphDriver`
492
+ protocol so the OGM Session can detect transaction support via
493
493
  ``isinstance`` checks.
494
494
  """
495
495
 
@@ -9,10 +9,10 @@ from __future__ import annotations
9
9
 
10
10
  from typing import TYPE_CHECKING, Any
11
11
 
12
- from runic.orm.driver.bolt import BoltDriver, BoltEdge, BoltNode
12
+ from runic.ogm.driver.bolt import BoltDriver, BoltEdge, BoltNode
13
13
 
14
14
  if TYPE_CHECKING:
15
- from runic.orm.core.descriptors import FieldInfo
15
+ from runic.ogm.core.descriptors import FieldInfo
16
16
 
17
17
 
18
18
  class ArcadeDBNode(BoltNode):
@@ -86,7 +86,7 @@ def create_arcadedb_driver(
86
86
  username: str,
87
87
  password: str,
88
88
  ) -> BoltDriver:
89
- """Create a :class:`~runic.orm.driver.bolt.BoltDriver` configured for ArcadeDB."""
89
+ """Create a :class:`~runic.ogm.driver.bolt.BoltDriver` configured for ArcadeDB."""
90
90
  return BoltDriver.from_params(
91
91
  host=host,
92
92
  port=port,