caddix 1.0.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.
@@ -0,0 +1,26 @@
1
+ {
2
+ "project": "caddix",
3
+ "version": "1.0.0",
4
+ "description": "PostgreSQL helper library for Python (connection pooling, session management, query building, CRUD, batch, stored funcs)",
5
+ "modules": {
6
+ "caddix": {
7
+ "__init__.py": "Exports: Setup (Configs), PGPool, DatabaseSession, CaddixError, CaddixSessionError, dict_row, tuple_row, scalar_row, class_row, namedtuple_row",
8
+ "config.py": "Configs / Setup: Thread-safe singleton registry for PG connection parameters (dbname, user, host, port, max_conns, options)",
9
+ "pool.py": "PGPool: Connection pool wrapper around psycopg_pool.ConnectionPool; handles checkouts, returns, connection health",
10
+ "base.py": "DatabaseSession: Core DB interface. Methods: query, select, select_one, select_many, insert, insert_batch, update, update_batch, upsert, upsert_batch, delete, exists, call_func, call_proc. Exceptions: CaddixError, CaddixSessionError",
11
+ "stores.py": "KeyValueStore / Store: Abstraction for simple key-value / document persistence on PostgreSQL tables",
12
+ "utils.py": "Query building helpers: identifier quoting, parameter sanitization, batch query construction"
13
+ }
14
+ },
15
+ "tests": [
16
+ "Tests/test_session_basics.py",
17
+ "Tests/test_crud_operations.py",
18
+ "Tests/test_batch_bulk.py",
19
+ "Tests/test_functions_procedures.py",
20
+ "Tests/test_config_pool.py",
21
+ "Tests/test_row_factories.py",
22
+ "Tests/test_security_penetration.py",
23
+ "Tests/test_provocation_edge_cases.py",
24
+ "Tests/test_stress_concurrency.py"
25
+ ]
26
+ }
@@ -0,0 +1,51 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ "main", "develop" ]
6
+ pull_request:
7
+ branches: [ "main", "develop" ]
8
+
9
+ jobs:
10
+ test:
11
+ name: Run Tests
12
+ runs-on: ubuntu-latest
13
+
14
+ services:
15
+ postgres:
16
+ image: postgres:16
17
+ env:
18
+ POSTGRES_DB: caddix
19
+ POSTGRES_USER: caddix
20
+ POSTGRES_PASSWORD: caddix
21
+ ports:
22
+ - 5432:5432
23
+ options: >-
24
+ --health-cmd pg_isready
25
+ --health-interval 10s
26
+ --health-timeout 5s
27
+ --health-retries 5
28
+
29
+ strategy:
30
+ matrix:
31
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
32
+
33
+ steps:
34
+ - name: Checkout repository
35
+ uses: actions/checkout@v4
36
+
37
+ - name: Install uv
38
+ uses: astral-sh/setup-uv@v5
39
+ with:
40
+ enable-cache: true
41
+
42
+ - name: Set up Python ${{ matrix.python-version }}
43
+ uses: actions/setup-python@v5
44
+ with:
45
+ python-version: ${{ matrix.python-version }}
46
+
47
+ - name: Install dependencies
48
+ run: uv sync --all-extras --dev
49
+
50
+ - name: Run test suite
51
+ run: uv run pytest
@@ -0,0 +1,40 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ push:
7
+ tags:
8
+ - "v*"
9
+ workflow_dispatch:
10
+
11
+ jobs:
12
+ pypi-publish:
13
+ name: Build and publish to PyPI
14
+ runs-on: ubuntu-latest
15
+ environment:
16
+ name: pypi
17
+ url: https://pypi.org/p/caddix
18
+ permissions:
19
+ id-token: write # Required for PyPI Trusted Publishing (OIDC)
20
+ contents: read
21
+
22
+ steps:
23
+ - name: Checkout repository
24
+ uses: actions/checkout@v4
25
+
26
+ - name: Install uv
27
+ uses: astral-sh/setup-uv@v5
28
+ with:
29
+ enable-cache: true
30
+
31
+ - name: Set up Python
32
+ uses: actions/setup-python@v5
33
+ with:
34
+ python-version: "3.12"
35
+
36
+ - name: Build distributions
37
+ run: uv build
38
+
39
+ - name: Publish distribution to PyPI
40
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,47 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+
28
+ # Virtual environments & uv
29
+ .venv/
30
+ env/
31
+ venv/
32
+ ENV/
33
+ env.bak/
34
+ venv.bak/
35
+
36
+ # IDE / Editor configs
37
+ .idea/
38
+ .vscode/
39
+ *.swp
40
+ *.swo
41
+
42
+ # Testing / Tooling caches
43
+ .pytest_cache/
44
+ .coverage
45
+ htmlcov/
46
+ .mypy_cache/
47
+ .ruff_cache/
caddix-1.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Marcus Gros
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.