wexample-orm 0.0.6__py3-none-any.whl
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.
- wexample_orm/__init__.py +13 -0
- wexample_orm/common/__init__.py +0 -0
- wexample_orm/common/abstract_repositories_manager.py +54 -0
- wexample_orm/entity/__init__.py +0 -0
- wexample_orm/entity/abstract_entity.py +31 -0
- wexample_orm/exception/__init__.py +0 -0
- wexample_orm/exception/repository_session_missing_exception.py +16 -0
- wexample_orm/exception/unknown_repository_exception.py +21 -0
- wexample_orm/py.typed +0 -0
- wexample_orm/repository/__init__.py +0 -0
- wexample_orm/repository/abstract_repository.py +63 -0
- wexample_orm/session/__init__.py +0 -0
- wexample_orm/session/abstract_session_factory.py +70 -0
- wexample_orm/testing/__init__.py +11 -0
- wexample_orm/testing/sqlite.py +59 -0
- wexample_orm-0.0.6.dist-info/METADATA +170 -0
- wexample_orm-0.0.6.dist-info/RECORD +19 -0
- wexample_orm-0.0.6.dist-info/WHEEL +4 -0
- wexample_orm-0.0.6.dist-info/entry_points.txt +4 -0
wexample_orm/__init__.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from wexample_orm.common.abstract_repositories_manager import (
|
|
4
|
+
AbstractRepositoriesManager,
|
|
5
|
+
)
|
|
6
|
+
from wexample_orm.entity.abstract_entity import AbstractEntity
|
|
7
|
+
from wexample_orm.repository.abstract_repository import AbstractRepository
|
|
8
|
+
|
|
9
|
+
__all__ = [
|
|
10
|
+
"AbstractEntity",
|
|
11
|
+
"AbstractRepositoriesManager",
|
|
12
|
+
"AbstractRepository",
|
|
13
|
+
]
|
|
File without changes
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from wexample_helpers.classes.base_class import BaseClass
|
|
6
|
+
from wexample_helpers.classes.field import public_field
|
|
7
|
+
from wexample_helpers.classes.private_field import private_field
|
|
8
|
+
from wexample_helpers.decorator.base_class import base_class
|
|
9
|
+
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from wexample_orm.entity.abstract_entity import AbstractEntity
|
|
12
|
+
from wexample_orm.repository.abstract_repository import AbstractRepository
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@base_class
|
|
16
|
+
class AbstractRepositoriesManager(BaseClass):
|
|
17
|
+
repository_classes: list[type[AbstractRepository]] = public_field(
|
|
18
|
+
description="Repository classes this manager can instantiate, keyed by their entity type.",
|
|
19
|
+
factory=list,
|
|
20
|
+
)
|
|
21
|
+
session: Any | None = public_field(
|
|
22
|
+
description="SQLAlchemy session shared by all repositories built by this manager.",
|
|
23
|
+
default=None,
|
|
24
|
+
)
|
|
25
|
+
_instances: dict[type[AbstractEntity], AbstractRepository] = private_field(
|
|
26
|
+
description="Cache of repository instances keyed by entity type.",
|
|
27
|
+
factory=dict,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
def get(self, entity_type: type[AbstractEntity]) -> AbstractRepository:
|
|
31
|
+
if entity_type in self._instances:
|
|
32
|
+
return self._instances[entity_type]
|
|
33
|
+
|
|
34
|
+
for repository_class in self.repository_classes:
|
|
35
|
+
if repository_class.get_entity_type() is entity_type:
|
|
36
|
+
repository = repository_class(session=self.session)
|
|
37
|
+
self._instances[entity_type] = repository
|
|
38
|
+
return repository
|
|
39
|
+
|
|
40
|
+
from wexample_orm.exception.unknown_repository_exception import (
|
|
41
|
+
UnknownRepositoryException,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
raise UnknownRepositoryException.for_entity(entity_type)
|
|
45
|
+
|
|
46
|
+
def get_by_table_name(self, table_name: str) -> AbstractRepository | None:
|
|
47
|
+
for repository_class in self.repository_classes:
|
|
48
|
+
entity_type = repository_class.get_entity_type()
|
|
49
|
+
if entity_type.get_entity_name() == table_name:
|
|
50
|
+
return self.get(entity_type)
|
|
51
|
+
return None
|
|
52
|
+
|
|
53
|
+
def get_classes(self) -> list[type[AbstractRepository]]:
|
|
54
|
+
return list(self.repository_classes)
|
|
File without changes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from sqlalchemy import Integer, Sequence
|
|
4
|
+
from sqlalchemy.orm import Mapped, as_declarative, declared_attr, mapped_column
|
|
5
|
+
from wexample_helpers.helpers.string import string_to_snake_case
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@as_declarative()
|
|
9
|
+
class AbstractEntity:
|
|
10
|
+
__abstract__ = True
|
|
11
|
+
|
|
12
|
+
@declared_attr
|
|
13
|
+
def __tablename__(cls) -> str:
|
|
14
|
+
return cls.get_entity_name()
|
|
15
|
+
|
|
16
|
+
@classmethod
|
|
17
|
+
def get_entity_name(cls) -> str:
|
|
18
|
+
return string_to_snake_case(cls.__name__)
|
|
19
|
+
|
|
20
|
+
@classmethod
|
|
21
|
+
def get_sequence(cls) -> Sequence:
|
|
22
|
+
return Sequence(f"{cls.get_entity_name()}_id_seq")
|
|
23
|
+
|
|
24
|
+
@declared_attr
|
|
25
|
+
def id(cls) -> Mapped[int]:
|
|
26
|
+
return mapped_column(
|
|
27
|
+
Integer,
|
|
28
|
+
cls.get_sequence(),
|
|
29
|
+
primary_key=True,
|
|
30
|
+
autoincrement=True,
|
|
31
|
+
)
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from wexample_helpers.exception.undefined_exception import UndefinedException
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class RepositorySessionMissingException(UndefinedException):
|
|
7
|
+
error_code = "ORM_REPOSITORY_SESSION_MISSING"
|
|
8
|
+
|
|
9
|
+
def __init__(self, repository_class_name: str) -> None:
|
|
10
|
+
super().__init__(
|
|
11
|
+
message=(
|
|
12
|
+
f"Repository '{repository_class_name}' has no session configured. "
|
|
13
|
+
"Pass `session=` when instantiating the manager or repository."
|
|
14
|
+
),
|
|
15
|
+
data={"repository_class": repository_class_name},
|
|
16
|
+
)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from wexample_helpers.exception.undefined_exception import UndefinedException
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from wexample_orm.entity.abstract_entity import AbstractEntity
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class UnknownRepositoryException(UndefinedException):
|
|
12
|
+
error_code = "ORM_UNKNOWN_REPOSITORY"
|
|
13
|
+
|
|
14
|
+
@classmethod
|
|
15
|
+
def for_entity(
|
|
16
|
+
cls, entity_type: type[AbstractEntity]
|
|
17
|
+
) -> UnknownRepositoryException:
|
|
18
|
+
return cls(
|
|
19
|
+
message=f"No repository registered for entity type: {entity_type.__name__}",
|
|
20
|
+
data={"entity_type": entity_type.__name__},
|
|
21
|
+
)
|
wexample_orm/py.typed
ADDED
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from wexample_helpers.classes.base_class import BaseClass
|
|
6
|
+
from wexample_helpers.classes.field import public_field
|
|
7
|
+
from wexample_helpers.decorator.base_class import base_class
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from sqlalchemy.orm import Query, Session
|
|
11
|
+
|
|
12
|
+
from wexample_orm.entity.abstract_entity import AbstractEntity
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@base_class
|
|
16
|
+
class AbstractRepository(BaseClass):
|
|
17
|
+
session: Any | None = public_field(
|
|
18
|
+
description="SQLAlchemy session used by this repository.",
|
|
19
|
+
default=None,
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def get_entity_type(cls) -> type[AbstractEntity]:
|
|
24
|
+
cls._raise_not_implemented_error()
|
|
25
|
+
|
|
26
|
+
def find(self, entity_id: int) -> AbstractEntity | None:
|
|
27
|
+
if self.session is None:
|
|
28
|
+
return None
|
|
29
|
+
return self.session.get(self.get_entity_type(), entity_id)
|
|
30
|
+
|
|
31
|
+
def find_one_by(self, filter_clause: Any) -> AbstractEntity | None:
|
|
32
|
+
return self.query().filter(filter_clause).first()
|
|
33
|
+
|
|
34
|
+
def query(self) -> Query:
|
|
35
|
+
self._require_session()
|
|
36
|
+
return self.session.query(self.get_entity_type())
|
|
37
|
+
|
|
38
|
+
def save(
|
|
39
|
+
self,
|
|
40
|
+
entity: AbstractEntity,
|
|
41
|
+
*,
|
|
42
|
+
flush: bool = True,
|
|
43
|
+
refresh: bool = False,
|
|
44
|
+
) -> AbstractEntity:
|
|
45
|
+
self._require_session()
|
|
46
|
+
|
|
47
|
+
self.session.add(entity)
|
|
48
|
+
if flush:
|
|
49
|
+
self.session.commit()
|
|
50
|
+
if refresh:
|
|
51
|
+
self.session.refresh(entity)
|
|
52
|
+
return entity
|
|
53
|
+
|
|
54
|
+
def _require_session(self) -> Session:
|
|
55
|
+
if self.session is None:
|
|
56
|
+
from wexample_orm.exception.repository_session_missing_exception import (
|
|
57
|
+
RepositorySessionMissingException,
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
raise RepositorySessionMissingException(
|
|
61
|
+
repository_class_name=self.__class__.__name__
|
|
62
|
+
)
|
|
63
|
+
return self.session
|
|
File without changes
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from wexample_helpers.classes.base_class import BaseClass
|
|
6
|
+
from wexample_helpers.classes.field import public_field
|
|
7
|
+
from wexample_helpers.classes.private_field import private_field
|
|
8
|
+
from wexample_helpers.decorator.base_class import base_class
|
|
9
|
+
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from sqlalchemy.engine import Engine
|
|
12
|
+
from sqlalchemy.orm import Session
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@base_class
|
|
16
|
+
class AbstractSessionFactory(BaseClass):
|
|
17
|
+
"""Build and cache a SQLAlchemy engine + sessionmaker from a DSN.
|
|
18
|
+
|
|
19
|
+
Subclasses can override `_engine_kwargs` / `_session_kwargs` to inject
|
|
20
|
+
project-specific options (echo, pool_pre_ping, expire_on_commit, ...).
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
dsn: str = public_field(
|
|
24
|
+
description="SQLAlchemy URL (e.g. 'postgresql+psycopg://user:pwd@host/db', 'sqlite:///:memory:').",
|
|
25
|
+
)
|
|
26
|
+
engine_options: dict[str, Any] = public_field(
|
|
27
|
+
description="Extra kwargs forwarded to sqlalchemy.create_engine().",
|
|
28
|
+
factory=dict,
|
|
29
|
+
)
|
|
30
|
+
session_options: dict[str, Any] = public_field(
|
|
31
|
+
description="Extra kwargs forwarded to sqlalchemy.orm.sessionmaker().",
|
|
32
|
+
factory=dict,
|
|
33
|
+
)
|
|
34
|
+
_engine: Engine | None = private_field(
|
|
35
|
+
description="Cached SQLAlchemy engine.",
|
|
36
|
+
default=None,
|
|
37
|
+
)
|
|
38
|
+
_sessionmaker: Any | None = private_field(
|
|
39
|
+
description="Cached sessionmaker bound to the engine.",
|
|
40
|
+
default=None,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
def create_session(self) -> Session:
|
|
44
|
+
if self._sessionmaker is None:
|
|
45
|
+
from sqlalchemy.orm import sessionmaker
|
|
46
|
+
|
|
47
|
+
self._sessionmaker = sessionmaker(
|
|
48
|
+
bind=self.get_engine(), **self._session_kwargs()
|
|
49
|
+
)
|
|
50
|
+
return self._sessionmaker()
|
|
51
|
+
|
|
52
|
+
def dispose(self) -> None:
|
|
53
|
+
"""Release the engine's connection pool. Useful in tests and teardown."""
|
|
54
|
+
if self._engine is not None:
|
|
55
|
+
self._engine.dispose()
|
|
56
|
+
self._engine = None
|
|
57
|
+
self._sessionmaker = None
|
|
58
|
+
|
|
59
|
+
def get_engine(self) -> Engine:
|
|
60
|
+
if self._engine is None:
|
|
61
|
+
from sqlalchemy import create_engine
|
|
62
|
+
|
|
63
|
+
self._engine = create_engine(self.dsn, **self._engine_kwargs())
|
|
64
|
+
return self._engine
|
|
65
|
+
|
|
66
|
+
def _engine_kwargs(self) -> dict[str, Any]:
|
|
67
|
+
return dict(self.engine_options)
|
|
68
|
+
|
|
69
|
+
def _session_kwargs(self) -> dict[str, Any]:
|
|
70
|
+
return dict(self.session_options)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""Testing helpers — spin up an in-memory SQLite session in 1 call.
|
|
2
|
+
|
|
3
|
+
Used by downstream packages that want to test repositories/managers without
|
|
4
|
+
standing up a real Postgres. Mirrors the spirit of `wexample_cli.testing.kernel`.
|
|
5
|
+
|
|
6
|
+
Typical use::
|
|
7
|
+
|
|
8
|
+
from wexample_orm.testing import in_memory_session
|
|
9
|
+
from wexample_orm.entity.abstract_entity import AbstractEntity
|
|
10
|
+
|
|
11
|
+
def test_user_save():
|
|
12
|
+
with in_memory_session(AbstractEntity) as session:
|
|
13
|
+
repo = UserRepository(session=session)
|
|
14
|
+
repo.save(User(name="alice"))
|
|
15
|
+
assert repo.find(1).name == "alice"
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from __future__ import annotations
|
|
19
|
+
|
|
20
|
+
from collections.abc import Iterator
|
|
21
|
+
from contextlib import contextmanager
|
|
22
|
+
from typing import TYPE_CHECKING
|
|
23
|
+
|
|
24
|
+
if TYPE_CHECKING:
|
|
25
|
+
from sqlalchemy.engine import Engine
|
|
26
|
+
from sqlalchemy.orm import Session
|
|
27
|
+
|
|
28
|
+
from wexample_orm.entity.abstract_entity import AbstractEntity
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def in_memory_engine() -> Engine:
|
|
32
|
+
"""Create a fresh in-memory SQLite engine."""
|
|
33
|
+
from sqlalchemy import create_engine
|
|
34
|
+
|
|
35
|
+
return create_engine("sqlite:///:memory:")
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
@contextmanager
|
|
39
|
+
def in_memory_session(
|
|
40
|
+
declarative_base: type[AbstractEntity],
|
|
41
|
+
) -> Iterator[Session]:
|
|
42
|
+
"""Yield a session bound to a fresh in-memory SQLite engine.
|
|
43
|
+
|
|
44
|
+
`declarative_base` must be a class decorated with `@as_declarative()`
|
|
45
|
+
(typically `AbstractEntity` or a project subclass). All tables declared
|
|
46
|
+
against its metadata are created automatically.
|
|
47
|
+
"""
|
|
48
|
+
from sqlalchemy.orm import sessionmaker
|
|
49
|
+
|
|
50
|
+
engine = in_memory_engine()
|
|
51
|
+
declarative_base.metadata.create_all(engine)
|
|
52
|
+
|
|
53
|
+
session_cls = sessionmaker(bind=engine)
|
|
54
|
+
session = session_cls()
|
|
55
|
+
try:
|
|
56
|
+
yield session
|
|
57
|
+
finally:
|
|
58
|
+
session.close()
|
|
59
|
+
engine.dispose()
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: wexample-orm
|
|
3
|
+
Version: 0.0.6
|
|
4
|
+
Summary: Generic ORM abstractions on top of SQLAlchemy.
|
|
5
|
+
Author-Email: weeger <contact@wexample.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Project-URL: homepage, https://github.com/wexample/python-orm
|
|
11
|
+
Requires-Python: >=3.10
|
|
12
|
+
Requires-Dist: attrs>=23.1.0
|
|
13
|
+
Requires-Dist: sqlalchemy<3,>=2
|
|
14
|
+
Requires-Dist: wexample-helpers>=13.0.0
|
|
15
|
+
Provides-Extra: dev
|
|
16
|
+
Requires-Dist: pytest; extra == "dev"
|
|
17
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# orm
|
|
21
|
+
|
|
22
|
+
Version: 0.0.6
|
|
23
|
+
|
|
24
|
+
Generic ORM abstractions on top of SQLAlchemy.
|
|
25
|
+
|
|
26
|
+
## Table of Contents
|
|
27
|
+
|
|
28
|
+
- [Tests](#tests)
|
|
29
|
+
- [Suite Integration](#suite-integration)
|
|
30
|
+
- [Dependencies](#dependencies)
|
|
31
|
+
- [Versioning](#versioning)
|
|
32
|
+
- [License](#license)
|
|
33
|
+
- [Suite Integration](#suite-integration)
|
|
34
|
+
- [Suite Signature](#suite-signature)
|
|
35
|
+
- [Introduction](#introduction)
|
|
36
|
+
- [Roadmap](#roadmap)
|
|
37
|
+
- [Status Compatibility](#status-compatibility)
|
|
38
|
+
- [Useful Links](#useful-links)
|
|
39
|
+
- [Migration Notes](#migration-notes)
|
|
40
|
+
|
|
41
|
+
## Tests
|
|
42
|
+
|
|
43
|
+
This project uses `pytest` for testing and `pytest-cov` for code coverage analysis.
|
|
44
|
+
|
|
45
|
+
### Installation
|
|
46
|
+
|
|
47
|
+
First, install the required testing dependencies:
|
|
48
|
+
```bash
|
|
49
|
+
.venv/bin/python -m pip install pytest pytest-cov
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Basic Usage
|
|
53
|
+
|
|
54
|
+
Run all tests with coverage:
|
|
55
|
+
```bash
|
|
56
|
+
.venv/bin/python -m pytest --cov --cov-report=html
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Common Commands
|
|
60
|
+
```bash
|
|
61
|
+
# Run tests with coverage for a specific module
|
|
62
|
+
.venv/bin/python -m pytest --cov=your_module
|
|
63
|
+
|
|
64
|
+
# Show which lines are not covered
|
|
65
|
+
.venv/bin/python -m pytest --cov=your_module --cov-report=term-missing
|
|
66
|
+
|
|
67
|
+
# Generate an HTML coverage report
|
|
68
|
+
.venv/bin/python -m pytest --cov=your_module --cov-report=html
|
|
69
|
+
|
|
70
|
+
# Combine terminal and HTML reports
|
|
71
|
+
.venv/bin/python -m pytest --cov=your_module --cov-report=term-missing --cov-report=html
|
|
72
|
+
|
|
73
|
+
# Run specific test file with coverage
|
|
74
|
+
.venv/bin/python -m pytest tests/test_file.py --cov=your_module --cov-report=term-missing
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Viewing HTML Reports
|
|
78
|
+
|
|
79
|
+
After generating an HTML report, open `htmlcov/index.html` in your browser to view detailed line-by-line coverage information.
|
|
80
|
+
|
|
81
|
+
### Coverage Threshold
|
|
82
|
+
|
|
83
|
+
To enforce a minimum coverage percentage:
|
|
84
|
+
```bash
|
|
85
|
+
.venv/bin/python -m pytest --cov=your_module --cov-fail-under=80
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
This will cause the test suite to fail if coverage drops below 80%.
|
|
89
|
+
|
|
90
|
+
## Integration in the Suite
|
|
91
|
+
|
|
92
|
+
This package is part of the Wexample Suite — a collection of high-quality, modular tools designed to work seamlessly together across multiple languages and environments.
|
|
93
|
+
|
|
94
|
+
### Related Packages
|
|
95
|
+
|
|
96
|
+
The suite includes packages for configuration management, file handling, prompts, and more. Each package can be used independently or as part of the integrated suite.
|
|
97
|
+
|
|
98
|
+
Visit the [Wexample Suite documentation](https://docs.wexample.com) for the complete package ecosystem.
|
|
99
|
+
|
|
100
|
+
## Dependencies
|
|
101
|
+
|
|
102
|
+
- attrs: >=23.1.0
|
|
103
|
+
- sqlalchemy: <3,>=2
|
|
104
|
+
- wexample-helpers: >=13.0.0
|
|
105
|
+
|
|
106
|
+
## Versioning & Compatibility Policy
|
|
107
|
+
|
|
108
|
+
Wexample packages follow **Semantic Versioning** (SemVer):
|
|
109
|
+
|
|
110
|
+
- **MAJOR**: Breaking changes
|
|
111
|
+
- **MINOR**: New features, backward compatible
|
|
112
|
+
- **PATCH**: Bug fixes, backward compatible
|
|
113
|
+
|
|
114
|
+
We maintain backward compatibility within major versions and provide clear migration guides for breaking changes.
|
|
115
|
+
|
|
116
|
+
## License
|
|
117
|
+
|
|
118
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
119
|
+
|
|
120
|
+
Free to use in both personal and commercial projects.
|
|
121
|
+
|
|
122
|
+
## Integration in the Suite
|
|
123
|
+
|
|
124
|
+
This package is part of the Wexample Suite — a collection of high-quality, modular tools designed to work seamlessly together across multiple languages and environments.
|
|
125
|
+
|
|
126
|
+
### Related Packages
|
|
127
|
+
|
|
128
|
+
The suite includes packages for configuration management, file handling, prompts, and more. Each package can be used independently or as part of the integrated suite.
|
|
129
|
+
|
|
130
|
+
Visit the [Wexample Suite documentation](https://docs.wexample.com) for the complete package ecosystem.
|
|
131
|
+
|
|
132
|
+
# About us
|
|
133
|
+
|
|
134
|
+
[Wexample](https://wexample.com) stands as a cornerstone of the digital ecosystem — a collective of seasoned engineers, researchers, and creators driven by a relentless pursuit of technological excellence. More than a media platform, it has grown into a vibrant community where innovation meets craftsmanship, and where every line of code reflects a commitment to clarity, durability, and shared intelligence.
|
|
135
|
+
|
|
136
|
+
This packages suite embodies this spirit. Trusted by professionals and enthusiasts alike, it delivers a consistent, high-quality foundation for modern development — open, elegant, and battle-tested. Its reputation is built on years of collaboration, refinement, and rigorous attention to detail, making it a natural choice for those who demand both robustness and beauty in their tools.
|
|
137
|
+
|
|
138
|
+
Wexample cultivates a culture of mastery. Each package, each contribution carries the mark of a community that values precision, ethics, and innovation — a community proud to shape the future of digital craftsmanship.
|
|
139
|
+
|
|
140
|
+
Python Doctrine inspired ORM
|
|
141
|
+
|
|
142
|
+
## Known Limitations & Roadmap
|
|
143
|
+
|
|
144
|
+
Current limitations and planned features are tracked in the GitHub issues.
|
|
145
|
+
|
|
146
|
+
See the [project roadmap](https://github.com/wexample/python-orm/issues) for upcoming features and improvements.
|
|
147
|
+
|
|
148
|
+
## Status & Compatibility
|
|
149
|
+
|
|
150
|
+
**Maturity**: Production-ready
|
|
151
|
+
|
|
152
|
+
**Python Support**: >=3.10
|
|
153
|
+
|
|
154
|
+
**OS Support**: Linux, macOS, Windows
|
|
155
|
+
|
|
156
|
+
**Status**: Actively maintained
|
|
157
|
+
|
|
158
|
+
## Useful Links
|
|
159
|
+
|
|
160
|
+
- **Homepage**: https://github.com/wexample/python-orm
|
|
161
|
+
- **Documentation**: [docs.wexample.com](https://docs.wexample.com)
|
|
162
|
+
- **Issue Tracker**: https://github.com/wexample/python-orm/issues
|
|
163
|
+
- **Discussions**: https://github.com/wexample/python-orm/discussions
|
|
164
|
+
- **PyPI**: [pypi.org/project/orm](https://pypi.org/project/orm/)
|
|
165
|
+
|
|
166
|
+
## Migration Notes
|
|
167
|
+
|
|
168
|
+
When upgrading between major versions, refer to the migration guides in the documentation.
|
|
169
|
+
|
|
170
|
+
Breaking changes are clearly documented with upgrade paths and examples.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
wexample_orm-0.0.6.dist-info/METADATA,sha256=FakKO2qQOuSh89rjqJDxAyeLks4lkyHWXPQIzlI8Bew,5975
|
|
2
|
+
wexample_orm-0.0.6.dist-info/WHEEL,sha256=Z36eTX6lG3PITRleSd5hAZHCcz52yg3c0JQVxKBbLW0,90
|
|
3
|
+
wexample_orm-0.0.6.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
|
4
|
+
wexample_orm/__init__.py,sha256=cWR5Ixodk0cDx66dfJDR42G6TaJA0XfVl8O0L1U9cas,371
|
|
5
|
+
wexample_orm/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
wexample_orm/common/abstract_repositories_manager.py,sha256=iB6_uEpfExbhtGBKgbjycjEMaQPUqUWaoDCLCN5fST8,2155
|
|
7
|
+
wexample_orm/entity/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
wexample_orm/entity/abstract_entity.py,sha256=8UeC4oBEgNef8obHzvGXom1brzU1qnJa4Oyx6zQ470o,808
|
|
9
|
+
wexample_orm/exception/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
wexample_orm/exception/repository_session_missing_exception.py,sha256=d9WsPl_qY1bIE_ypR1xH5RQ4CPoDyQmN3KO2Wwr5yJw,587
|
|
11
|
+
wexample_orm/exception/unknown_repository_exception.py,sha256=OqYAXhIdXe6kvkZujdDSHQFN5tmC2CBsv2LXYAS8pSE,629
|
|
12
|
+
wexample_orm/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
|
+
wexample_orm/repository/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
+
wexample_orm/repository/abstract_repository.py,sha256=3cqlqd7LAO_kvohz0X6Cwh3_YrzkFveKm90ErcV2mHU,1873
|
|
15
|
+
wexample_orm/session/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
+
wexample_orm/session/abstract_session_factory.py,sha256=LsCw62eh8KvxFUmSWfm-Lc4DKsaeMP4i1u9zJgfZuT0,2376
|
|
17
|
+
wexample_orm/testing/__init__.py,sha256=lcw-FXXJJ56rhSR8f1oE4WYcd8UR4scxxYEz3euWTZE,189
|
|
18
|
+
wexample_orm/testing/sqlite.py,sha256=vvOIbl9nG6OEIDFrZldpRD6QOt7zb23KD0-s1QXYqew,1762
|
|
19
|
+
wexample_orm-0.0.6.dist-info/RECORD,,
|