sqlalchemy-abstractions 0.1.1__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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Winipedia
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,84 @@
1
+ Metadata-Version: 2.4
2
+ Name: sqlalchemy-abstractions
3
+ Version: 0.1.1
4
+ Summary: Reusable utilities for SQLAlchemy.
5
+ Keywords:
6
+ Author: Winipedia
7
+ Author-email: Winipedia <winipedia@gmx.de>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: Python :: 3 :: Only
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Programming Language :: Python :: 3.14
15
+ Classifier: Programming Language :: Python :: 3.15
16
+ Classifier: Typing :: Typed
17
+ Requires-Dist: inflection>=0.6.1
18
+ Requires-Dist: pyrig-runtime>=3.28.12
19
+ Requires-Dist: sqlalchemy>=2.1.10
20
+ Maintainer: Winipedia
21
+ Maintainer-email: Winipedia <winipedia@gmx.de>
22
+ Requires-Python: >=3.12
23
+ Project-URL: Changelog, https://github.com/Winipedia/sqlalchemy-abstractions/releases
24
+ Project-URL: Documentation, https://Winipedia.github.io/sqlalchemy-abstractions
25
+ Project-URL: Homepage, https://github.com/Winipedia/sqlalchemy-abstractions
26
+ Project-URL: Issues, https://github.com/Winipedia/sqlalchemy-abstractions/issues
27
+ Project-URL: Source, https://github.com/Winipedia/sqlalchemy-abstractions
28
+ Description-Content-Type: text/markdown
29
+
30
+ # sqlalchemy-abstractions
31
+
32
+ <!-- project-status -->
33
+ [![CI](https://img.shields.io/github/actions/workflow/status/Winipedia/sqlalchemy-abstractions/health-check.yml?label=CI&logo=github)](https://github.com/Winipedia/sqlalchemy-abstractions/actions/workflows/health-check.yml)
34
+ [![CD](https://img.shields.io/github/actions/workflow/status/Winipedia/sqlalchemy-abstractions/release.yml?label=CD&logo=github)](https://github.com/Winipedia/sqlalchemy-abstractions/actions/workflows/release.yml)
35
+ [![ProjectTester](https://codecov.io/gh/Winipedia/sqlalchemy-abstractions/branch/main/graph/badge.svg)](https://codecov.io/gh/Winipedia/sqlalchemy-abstractions)
36
+ [![SecurityPracticesChecker](https://api.scorecard.dev/projects/github.com/Winipedia/sqlalchemy-abstractions/badge)](https://scorecard.dev/viewer/?uri=github.com/Winipedia/sqlalchemy-abstractions)
37
+ [![Best Practices](https://www.bestpractices.dev/en/projects?as=badge&url=https%3A%2F%2Fgithub.com%2FWinipedia%2Fsqlalchemy-abstractions)](https://www.bestpractices.dev/en/projects?as=entry&url=https%3A%2F%2Fgithub.com%2FWinipedia%2Fsqlalchemy-abstractions)
38
+ [![Baseline](https://www.bestpractices.dev/en/projects?as=baseline&url=https%3A%2F%2Fgithub.com%2FWinipedia%2Fsqlalchemy-abstractions)](https://www.bestpractices.dev/en/projects?as=entry&url=https%3A%2F%2Fgithub.com%2FWinipedia%2Fsqlalchemy-abstractions)
39
+ <!-- code-quality -->
40
+ [![ByteOrderMarkerFormatter](https://img.shields.io/badge/BOM-fix--byte--order--marker-orange)](https://prek.j178.dev/reference/built-in-hooks/#fix-byte-order-marker)
41
+ [![CICDLinter](https://img.shields.io/badge/CI/CD-actionlint-blue)](https://github.com/rhysd/actionlint)
42
+ [![CICDSecurityChecker](https://img.shields.io/badge/%F0%9F%8C%88-zizmor-white?labelColor=white)](https://github.com/zizmorcore/zizmor)
43
+ [![CaseConflictChecker](https://img.shields.io/badge/case--conflict-check--case--conflict-blue)](https://prek.j178.dev/reference/built-in-hooks/#check-case-conflict)
44
+ [![CodeAnalyzer](https://img.shields.io/badge/code--analysis-CodeQL-181717?logo=github)](https://codeql.github.com/docs/)
45
+ [![DeadCodeChecker](https://img.shields.io/badge/dead--code-vulture-blue)](https://github.com/jendrikseipp/vulture)
46
+ [![DependencyChecker](https://img.shields.io/badge/dependencies-deptry-blue)](https://github.com/osprey-oss/deptry)
47
+ [![EndOfFileFormatter](https://img.shields.io/badge/EOF-end--of--file--fixer-orange)](https://prek.j178.dev/reference/built-in-hooks/#end-of-file-fixer)
48
+ [![EndOfLineFormatter](https://img.shields.io/badge/EOL-mixed--line--ending-orange)](https://prek.j178.dev/reference/built-in-hooks/#mixed-line-ending)
49
+ [![FuzzTester](https://img.shields.io/badge/fuzzing-hypothesis-blue)](https://hypothesis.readthedocs.io/en/latest/)
50
+ [![JSONFormatter](https://img.shields.io/badge/JSON-pretty--format--json-orange)](https://prek.j178.dev/reference/built-in-hooks/#pretty-format-json)
51
+ [![JSONLinter](https://img.shields.io/badge/JSON-check--json-blue)](https://prek.j178.dev/reference/built-in-hooks/#check-json)
52
+ [![LargeFileChecker](https://img.shields.io/badge/large--files-check--added--large--files-blue)](https://prek.j178.dev/reference/built-in-hooks/#check-added-large-files)
53
+ [![MarkdownLinter](https://img.shields.io/badge/Markdown-rumdl-darkgreen)](https://github.com/rvben/rumdl)
54
+ [![MergeConflictChecker](https://img.shields.io/badge/merge--conflict-check--merge--conflict-blue)](https://prek.j178.dev/reference/built-in-hooks/#check-merge-conflict)
55
+ [![ModuleTestNamingChecker](https://img.shields.io/badge/test--naming-name--tests--test-blue)](https://github.com/pre-commit/pre-commit-hooks#name-tests-test)
56
+ [![PythonLinter](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
57
+ [![PythonOrderLinter](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Winipedia/pyorder/main/docs/assets/badge.json)](https://github.com/Winipedia/pyorder)
58
+ [![SecretsChecker](https://img.shields.io/badge/secrets-detect--secrets-blue)](https://github.com/Yelp/detect-secrets)
59
+ [![SecurityChecker](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
60
+ [![ShellFormatter](https://img.shields.io/badge/shell-shfmt-orange)](https://github.com/mvdan/sh)
61
+ [![ShellLinter](https://img.shields.io/badge/shell-shellcheck-blue)](https://github.com/koalaman/shellcheck)
62
+ [![SpellChecker](https://img.shields.io/badge/spell--check-typos-blue)](https://github.com/crate-ci/typos)
63
+ [![TOMLLinter](https://img.shields.io/badge/TOML-tombi-blueviolet)](https://github.com/tombi-toml/tombi)
64
+ [![TrailingWhitespaceFormatter](https://img.shields.io/badge/whitespace-trailing--whitespace-orange)](https://prek.j178.dev/reference/built-in-hooks/#trailing-whitespace)
65
+ [![TypeChecker](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ty/main/assets/badge/v0.json)](https://github.com/astral-sh/ty)
66
+ [![XMLLinter](https://img.shields.io/badge/XML-check--xml-blue)](https://prek.j178.dev/reference/built-in-hooks/#check-xml)
67
+ [![YAMLLinter](https://img.shields.io/badge/YAML-ryl-red)](https://github.com/owenlamont/ryl)
68
+ <!-- tooling -->
69
+ [![PackageManager](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
70
+ [![Pyrigger](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Winipedia/pyrig/main/docs/assets/badge.json)](https://github.com/Winipedia/pyrig)
71
+ [![RemoteVersionController](https://img.shields.io/github/stars/Winipedia/sqlalchemy-abstractions?style=social)](https://github.com/Winipedia/sqlalchemy-abstractions)
72
+ [![VersionControlHookManager](https://raw.githubusercontent.com/j178/prek/master/docs/assets/badge.svg)](https://github.com/j178/prek)
73
+ [![VersionController](https://img.shields.io/badge/Git-F05032?logo=git&logoColor=white)](https://git-scm.com)
74
+ <!-- project-info -->
75
+ [![DocsBuilder](https://img.shields.io/badge/Documentation-zensical-326CE5)](https://Winipedia.github.io/sqlalchemy-abstractions)
76
+ [![PackageIndex](https://img.shields.io/pypi/v/sqlalchemy-abstractions?logo=pypi&logoColor=white)](https://pypi.org/project/sqlalchemy-abstractions)
77
+ [![ProgrammingLanguage](https://img.shields.io/pypi/pyversions/sqlalchemy-abstractions)](https://www.python.org)
78
+ [![License](https://img.shields.io/github/license/Winipedia/sqlalchemy-abstractions)](https://github.com/Winipedia/sqlalchemy-abstractions/blob/main/LICENSE)
79
+
80
+ ---
81
+
82
+ > Reusable utilities for SQLAlchemy.
83
+
84
+ ---
@@ -0,0 +1,55 @@
1
+ # sqlalchemy-abstractions
2
+
3
+ <!-- project-status -->
4
+ [![CI](https://img.shields.io/github/actions/workflow/status/Winipedia/sqlalchemy-abstractions/health-check.yml?label=CI&logo=github)](https://github.com/Winipedia/sqlalchemy-abstractions/actions/workflows/health-check.yml)
5
+ [![CD](https://img.shields.io/github/actions/workflow/status/Winipedia/sqlalchemy-abstractions/release.yml?label=CD&logo=github)](https://github.com/Winipedia/sqlalchemy-abstractions/actions/workflows/release.yml)
6
+ [![ProjectTester](https://codecov.io/gh/Winipedia/sqlalchemy-abstractions/branch/main/graph/badge.svg)](https://codecov.io/gh/Winipedia/sqlalchemy-abstractions)
7
+ [![SecurityPracticesChecker](https://api.scorecard.dev/projects/github.com/Winipedia/sqlalchemy-abstractions/badge)](https://scorecard.dev/viewer/?uri=github.com/Winipedia/sqlalchemy-abstractions)
8
+ [![Best Practices](https://www.bestpractices.dev/en/projects?as=badge&url=https%3A%2F%2Fgithub.com%2FWinipedia%2Fsqlalchemy-abstractions)](https://www.bestpractices.dev/en/projects?as=entry&url=https%3A%2F%2Fgithub.com%2FWinipedia%2Fsqlalchemy-abstractions)
9
+ [![Baseline](https://www.bestpractices.dev/en/projects?as=baseline&url=https%3A%2F%2Fgithub.com%2FWinipedia%2Fsqlalchemy-abstractions)](https://www.bestpractices.dev/en/projects?as=entry&url=https%3A%2F%2Fgithub.com%2FWinipedia%2Fsqlalchemy-abstractions)
10
+ <!-- code-quality -->
11
+ [![ByteOrderMarkerFormatter](https://img.shields.io/badge/BOM-fix--byte--order--marker-orange)](https://prek.j178.dev/reference/built-in-hooks/#fix-byte-order-marker)
12
+ [![CICDLinter](https://img.shields.io/badge/CI/CD-actionlint-blue)](https://github.com/rhysd/actionlint)
13
+ [![CICDSecurityChecker](https://img.shields.io/badge/%F0%9F%8C%88-zizmor-white?labelColor=white)](https://github.com/zizmorcore/zizmor)
14
+ [![CaseConflictChecker](https://img.shields.io/badge/case--conflict-check--case--conflict-blue)](https://prek.j178.dev/reference/built-in-hooks/#check-case-conflict)
15
+ [![CodeAnalyzer](https://img.shields.io/badge/code--analysis-CodeQL-181717?logo=github)](https://codeql.github.com/docs/)
16
+ [![DeadCodeChecker](https://img.shields.io/badge/dead--code-vulture-blue)](https://github.com/jendrikseipp/vulture)
17
+ [![DependencyChecker](https://img.shields.io/badge/dependencies-deptry-blue)](https://github.com/osprey-oss/deptry)
18
+ [![EndOfFileFormatter](https://img.shields.io/badge/EOF-end--of--file--fixer-orange)](https://prek.j178.dev/reference/built-in-hooks/#end-of-file-fixer)
19
+ [![EndOfLineFormatter](https://img.shields.io/badge/EOL-mixed--line--ending-orange)](https://prek.j178.dev/reference/built-in-hooks/#mixed-line-ending)
20
+ [![FuzzTester](https://img.shields.io/badge/fuzzing-hypothesis-blue)](https://hypothesis.readthedocs.io/en/latest/)
21
+ [![JSONFormatter](https://img.shields.io/badge/JSON-pretty--format--json-orange)](https://prek.j178.dev/reference/built-in-hooks/#pretty-format-json)
22
+ [![JSONLinter](https://img.shields.io/badge/JSON-check--json-blue)](https://prek.j178.dev/reference/built-in-hooks/#check-json)
23
+ [![LargeFileChecker](https://img.shields.io/badge/large--files-check--added--large--files-blue)](https://prek.j178.dev/reference/built-in-hooks/#check-added-large-files)
24
+ [![MarkdownLinter](https://img.shields.io/badge/Markdown-rumdl-darkgreen)](https://github.com/rvben/rumdl)
25
+ [![MergeConflictChecker](https://img.shields.io/badge/merge--conflict-check--merge--conflict-blue)](https://prek.j178.dev/reference/built-in-hooks/#check-merge-conflict)
26
+ [![ModuleTestNamingChecker](https://img.shields.io/badge/test--naming-name--tests--test-blue)](https://github.com/pre-commit/pre-commit-hooks#name-tests-test)
27
+ [![PythonLinter](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
28
+ [![PythonOrderLinter](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Winipedia/pyorder/main/docs/assets/badge.json)](https://github.com/Winipedia/pyorder)
29
+ [![SecretsChecker](https://img.shields.io/badge/secrets-detect--secrets-blue)](https://github.com/Yelp/detect-secrets)
30
+ [![SecurityChecker](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
31
+ [![ShellFormatter](https://img.shields.io/badge/shell-shfmt-orange)](https://github.com/mvdan/sh)
32
+ [![ShellLinter](https://img.shields.io/badge/shell-shellcheck-blue)](https://github.com/koalaman/shellcheck)
33
+ [![SpellChecker](https://img.shields.io/badge/spell--check-typos-blue)](https://github.com/crate-ci/typos)
34
+ [![TOMLLinter](https://img.shields.io/badge/TOML-tombi-blueviolet)](https://github.com/tombi-toml/tombi)
35
+ [![TrailingWhitespaceFormatter](https://img.shields.io/badge/whitespace-trailing--whitespace-orange)](https://prek.j178.dev/reference/built-in-hooks/#trailing-whitespace)
36
+ [![TypeChecker](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ty/main/assets/badge/v0.json)](https://github.com/astral-sh/ty)
37
+ [![XMLLinter](https://img.shields.io/badge/XML-check--xml-blue)](https://prek.j178.dev/reference/built-in-hooks/#check-xml)
38
+ [![YAMLLinter](https://img.shields.io/badge/YAML-ryl-red)](https://github.com/owenlamont/ryl)
39
+ <!-- tooling -->
40
+ [![PackageManager](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
41
+ [![Pyrigger](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Winipedia/pyrig/main/docs/assets/badge.json)](https://github.com/Winipedia/pyrig)
42
+ [![RemoteVersionController](https://img.shields.io/github/stars/Winipedia/sqlalchemy-abstractions?style=social)](https://github.com/Winipedia/sqlalchemy-abstractions)
43
+ [![VersionControlHookManager](https://raw.githubusercontent.com/j178/prek/master/docs/assets/badge.svg)](https://github.com/j178/prek)
44
+ [![VersionController](https://img.shields.io/badge/Git-F05032?logo=git&logoColor=white)](https://git-scm.com)
45
+ <!-- project-info -->
46
+ [![DocsBuilder](https://img.shields.io/badge/Documentation-zensical-326CE5)](https://Winipedia.github.io/sqlalchemy-abstractions)
47
+ [![PackageIndex](https://img.shields.io/pypi/v/sqlalchemy-abstractions?logo=pypi&logoColor=white)](https://pypi.org/project/sqlalchemy-abstractions)
48
+ [![ProgrammingLanguage](https://img.shields.io/pypi/pyversions/sqlalchemy-abstractions)](https://www.python.org)
49
+ [![License](https://img.shields.io/github/license/Winipedia/sqlalchemy-abstractions)](https://github.com/Winipedia/sqlalchemy-abstractions/blob/main/LICENSE)
50
+
51
+ ---
52
+
53
+ > Reusable utilities for SQLAlchemy.
54
+
55
+ ---
@@ -0,0 +1,137 @@
1
+ [project]
2
+ name = "sqlalchemy-abstractions"
3
+ version = "0.1.1"
4
+ description = "Reusable utilities for SQLAlchemy."
5
+ readme = "README.md"
6
+ requires-python = ">=3.12"
7
+ license = "MIT"
8
+ license-files = ["LICENSE"]
9
+ keywords = []
10
+ classifiers = [
11
+ "Operating System :: OS Independent",
12
+ "Programming Language :: Python :: 3 :: Only",
13
+ "Programming Language :: Python :: 3.12",
14
+ "Programming Language :: Python :: 3.13",
15
+ "Programming Language :: Python :: 3.14",
16
+ "Programming Language :: Python :: 3.15",
17
+ "Typing :: Typed",
18
+ ]
19
+ dependencies = [
20
+ "inflection>=0.6.1",
21
+ "pyrig-runtime>=3.28.12",
22
+ "sqlalchemy>=2.1.10",
23
+ ]
24
+
25
+ [[project.authors]]
26
+ name = "Winipedia"
27
+ email = "winipedia@gmx.de"
28
+
29
+ [[project.maintainers]]
30
+ name = "Winipedia"
31
+ email = "winipedia@gmx.de"
32
+
33
+ [project.urls]
34
+ Changelog = "https://github.com/Winipedia/sqlalchemy-abstractions/releases"
35
+ Documentation = "https://Winipedia.github.io/sqlalchemy-abstractions"
36
+ Homepage = "https://github.com/Winipedia/sqlalchemy-abstractions"
37
+ Issues = "https://github.com/Winipedia/sqlalchemy-abstractions/issues"
38
+ Source = "https://github.com/Winipedia/sqlalchemy-abstractions"
39
+
40
+ [project.scripts]
41
+ sqlalchemy-abstractions = "pyrig_runtime.rig.cli.main:main"
42
+
43
+ [dependency-groups]
44
+ dev = [
45
+ "actionlint-py>=1.7.12.25",
46
+ "bandit>=1.9.4",
47
+ "deptry>=0.25.1",
48
+ "detect-secrets>=1.5.0",
49
+ "hypofuzz>=25.11.1",
50
+ "hypothesis>=6.170.29",
51
+ "mkdocstrings[python]>=1.0.8",
52
+ "pre-commit-hooks>=6.0.0",
53
+ "prek>=0.6.0",
54
+ "pyflakes>=4.1.0",
55
+ "pyorder>=1.1.12",
56
+ "pyrig-opensource>=1.4.12",
57
+ "pyrig-pypi>=4.2.13",
58
+ "pytest>=9.2.0",
59
+ "pytest-cov>=7.1.0",
60
+ "pytest-randomly>=5.1.0",
61
+ "pytest-xdist>=3.8.0",
62
+ "ruff>=0.17.6",
63
+ "rumdl>=0.3.11",
64
+ "ryl>=0.30.0",
65
+ "shellcheck-py>=0.11.0.1",
66
+ "shfmt-py>=4.2.0",
67
+ "tombi>=1.11.4",
68
+ "ty>=1.2.0",
69
+ "typos>=1.53.0",
70
+ "vulture>=2.16",
71
+ "zensical>=0.1.5",
72
+ "zizmor>=1.33.1",
73
+ ]
74
+
75
+ [build-system]
76
+ requires = ["uv-build"]
77
+ build-backend = "uv_build"
78
+
79
+ [tool.deptry]
80
+ root = "src"
81
+
82
+ [tool.deptry.per_rule_ignores]
83
+ DEP002 = ["pyrig-runtime"]
84
+
85
+ [tool.pytest]
86
+ addopts = [
87
+ "--cov-branch",
88
+ "--cov-fail-under=100",
89
+ "--cov-report=term-missing:skip-covered",
90
+ "--cov-report=xml",
91
+ "--cov=sqlalchemy_abstractions",
92
+ "--dist=worksteal",
93
+ "--numprocesses=auto",
94
+ "--report-chars=a",
95
+ ]
96
+ filterwarnings = ["error"]
97
+ strict = true
98
+ testpaths = ["tests"]
99
+
100
+ [tool.ruff.format]
101
+ docstring-code-format = true
102
+
103
+ [tool.ruff.lint]
104
+ ignore = ["CPY001"]
105
+ select = ["ALL"]
106
+
107
+ [tool.ruff.lint.per-file-ignores]
108
+ "tests/**/*.py" = ["S101"]
109
+
110
+ [tool.ruff.lint.pydocstyle]
111
+ convention = "google"
112
+
113
+ [tool.ryl.lint]
114
+ strict = true
115
+
116
+ [tool.ryl.lint.rules]
117
+ ALL = "enable"
118
+ key-ordering = "disable"
119
+ yaml-directive = "disable"
120
+
121
+ [tool.ty.rules]
122
+ all = "error"
123
+
124
+ [tool.typos.default]
125
+ extend-ignore-re = [
126
+ "(?m)^.*spellchecker:disable-line.*$",
127
+ """
128
+ (?m)^.*spellchecker:disable-next-line.*
129
+ .*""",
130
+ ]
131
+ locale = "en-us"
132
+
133
+ [tool.vulture]
134
+ paths = [
135
+ "src",
136
+ "vulture_whitelist.py",
137
+ ]
@@ -0,0 +1,149 @@
1
+ [project]
2
+ name = "sqlalchemy-abstractions"
3
+ version = "0.1.1"
4
+ description = "Reusable utilities for SQLAlchemy."
5
+ readme = "README.md"
6
+ requires-python = ">=3.12"
7
+ license = "MIT"
8
+ license-files = [
9
+ "LICENSE",
10
+ ]
11
+ authors = [
12
+ { name = "Winipedia", email = "winipedia@gmx.de" },
13
+ ]
14
+ maintainers = [
15
+ { name = "Winipedia", email = "winipedia@gmx.de" },
16
+ ]
17
+ keywords = []
18
+ classifiers = [
19
+ "Operating System :: OS Independent",
20
+ "Programming Language :: Python :: 3 :: Only",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
23
+ "Programming Language :: Python :: 3.14",
24
+ "Programming Language :: Python :: 3.15",
25
+ "Typing :: Typed",
26
+ ]
27
+ dependencies = [
28
+ "inflection>=0.6.1",
29
+ "pyrig-runtime>=3.28.12",
30
+ "sqlalchemy>=2.1.10",
31
+ ]
32
+
33
+ [project.urls]
34
+ Changelog = "https://github.com/Winipedia/sqlalchemy-abstractions/releases"
35
+ Documentation = "https://Winipedia.github.io/sqlalchemy-abstractions"
36
+ Homepage = "https://github.com/Winipedia/sqlalchemy-abstractions"
37
+ Issues = "https://github.com/Winipedia/sqlalchemy-abstractions/issues"
38
+ Source = "https://github.com/Winipedia/sqlalchemy-abstractions"
39
+
40
+ [project.scripts]
41
+ sqlalchemy-abstractions = "pyrig_runtime.rig.cli.main:main"
42
+
43
+ [dependency-groups]
44
+ dev = [
45
+ "actionlint-py>=1.7.12.25",
46
+ "bandit>=1.9.4",
47
+ "deptry>=0.25.1",
48
+ "detect-secrets>=1.5.0",
49
+ "hypofuzz>=25.11.1",
50
+ "hypothesis>=6.170.29",
51
+ "mkdocstrings[python]>=1.0.8",
52
+ "pre-commit-hooks>=6.0.0",
53
+ "prek>=0.6.0",
54
+ "pyflakes>=4.1.0",
55
+ "pyorder>=1.1.12",
56
+ "pyrig-opensource>=1.4.12",
57
+ "pyrig-pypi>=4.2.13",
58
+ "pytest>=9.2.0",
59
+ "pytest-cov>=7.1.0",
60
+ "pytest-randomly>=5.1.0",
61
+ "pytest-xdist>=3.8.0",
62
+ "ruff>=0.17.6",
63
+ "rumdl>=0.3.11",
64
+ "ryl>=0.30.0",
65
+ "shellcheck-py>=0.11.0.1",
66
+ "shfmt-py>=4.2.0",
67
+ "tombi>=1.11.4",
68
+ "ty>=1.2.0",
69
+ "typos>=1.53.0",
70
+ "vulture>=2.16",
71
+ "zensical>=0.1.5",
72
+ "zizmor>=1.33.1",
73
+ ]
74
+
75
+ [build-system]
76
+ requires = [
77
+ "uv-build",
78
+ ]
79
+ build-backend = "uv_build"
80
+
81
+ [tool.deptry]
82
+ root = "src"
83
+
84
+ [tool.deptry.per_rule_ignores]
85
+ DEP002 = [
86
+ "pyrig-runtime",
87
+ ]
88
+
89
+ [tool.pytest]
90
+ addopts = [
91
+ "--cov-branch",
92
+ "--cov-fail-under=100",
93
+ "--cov-report=term-missing:skip-covered",
94
+ "--cov-report=xml",
95
+ "--cov=sqlalchemy_abstractions",
96
+ "--dist=worksteal",
97
+ "--numprocesses=auto",
98
+ "--report-chars=a",
99
+ ]
100
+ filterwarnings = [
101
+ "error",
102
+ ]
103
+ strict = true
104
+ testpaths = [
105
+ "tests",
106
+ ]
107
+
108
+ [tool.ruff.format]
109
+ docstring-code-format = true
110
+
111
+ [tool.ruff.lint]
112
+ ignore = [
113
+ "CPY001",
114
+ ]
115
+ select = [
116
+ "ALL",
117
+ ]
118
+
119
+ [tool.ruff.lint.per-file-ignores]
120
+ "tests/**/*.py" = [
121
+ "S101",
122
+ ]
123
+
124
+ [tool.ruff.lint.pydocstyle]
125
+ convention = "google"
126
+
127
+ [tool.ryl.lint]
128
+ strict = true
129
+
130
+ [tool.ryl.lint.rules]
131
+ ALL = "enable"
132
+ key-ordering = "disable"
133
+ yaml-directive = "disable"
134
+
135
+ [tool.ty.rules]
136
+ all = "error"
137
+
138
+ [tool.typos.default]
139
+ extend-ignore-re = [
140
+ "(?m)^.*spellchecker:disable-line.*$",
141
+ "(?m)^.*spellchecker:disable-next-line.*\n.*",
142
+ ]
143
+ locale = "en-us"
144
+
145
+ [tool.vulture]
146
+ paths = [
147
+ "src",
148
+ "vulture_whitelist.py",
149
+ ]
@@ -0,0 +1 @@
1
+ """The top-level package for the project."""
@@ -0,0 +1,49 @@
1
+ """Composable SQLAlchemy dataclass model bases and conventions."""
2
+
3
+ from typing import override
4
+
5
+ from inflection import underscore
6
+ from sqlalchemy.orm import (
7
+ DeclarativeBase,
8
+ Mapped,
9
+ MappedAsDataclass,
10
+ declared_attr,
11
+ mapped_column,
12
+ )
13
+
14
+
15
+ class DeclarativeDataclassModel(MappedAsDataclass, DeclarativeBase):
16
+ """Base for SQLAlchemy declarative dataclass models."""
17
+
18
+
19
+ class AutoTableNameModel(DeclarativeDataclassModel):
20
+ """Derive table names from model class names using snake case."""
21
+
22
+ __abstract__ = True
23
+
24
+ @declared_attr.directive
25
+ @classmethod
26
+ @override
27
+ def __tablename__(cls) -> str:
28
+ """Return the model's snake-case table name."""
29
+ return underscore(cls.__name__)
30
+
31
+
32
+ class IdModel(DeclarativeDataclassModel):
33
+ """Add an integer primary key excluded from the dataclass constructor."""
34
+
35
+ __abstract__ = True
36
+
37
+ id: Mapped[int] = mapped_column(init=False, primary_key=True)
38
+
39
+
40
+ class TableNameIdModel(AutoTableNameModel, IdModel):
41
+ """Dataclass model base with automatic table names and integer IDs."""
42
+
43
+ __abstract__ = True
44
+
45
+
46
+ class Model(TableNameIdModel):
47
+ """Abstract Model base with automatic standard behavior."""
48
+
49
+ __abstract__ = True