Skip to main content

Caddix Logo

Caddix - PostgreSQL Connection Assistant

Caddix is a lightweight, high-performance Python helper library built on top of psycopg 3 designed to make interacting with PostgreSQL databases easier, faster, and safer.


🚀 Key Features & Advantages

  • Boilerplate-Free CRUD: High-level Python methods for querying, inserting, updating, and deleting rows without writing raw SQL strings for simple tasks.
  • Built-in Connection Pooling: Thread-safe connection pool with configurable Time-To-Live (TTL), automatic health checks, and reconnects.
  • Transaction Safety (Rollback-by-Default): Sessions automatically roll back uncommitted changes when exiting context manager blocks or on unhandled exceptions.
  • SQL-Injection Safe: Secure SQL generation using psycopg.sql.Identifier and strict parameter binding.
  • Blazing Fast Mass Ingestion: insert_batch leverages native PostgreSQL COPY FROM STDIN streaming for inserting thousands of records in milliseconds.
  • Rich Row Factories: Easily map rows to Python dict, tuple, namedtuple, or custom @dataclass objects.
  • Keyword-Friendly: Automatically handles Python reserved words in column names (e.g. _from, _class, _import).

📦 Installation & Requirements

Caddix requires Python 3.10+. The database driver psycopg (version 3.x) is automatically installed as a core dependency.

Using pip

pip install caddix
uv add caddix

💡 Performance Note: For optimal performance without needing a local C compiler, you can optionally install the pre-compiled binary PostgreSQL driver via pip install "psycopg[binary]" or uv add "psycopg[binary]".


⚡ Quickstart Guide

Here is a 30-second quickstart demonstrating how simple it is to configure and use Caddix:

import caddix

# 1. Configure the database connection
caddix.Setup(
    databasename='app_db',
    username='postgres',
    password='mysecretpassword',
    hostname='localhost',
    port=5432
)

# 2. Open a session and execute queries
with caddix.DatabaseSession() as db:
    # SQL-free query: fetches a single row as a dictionary
    user = db.select_one('users', id=1)
    print("User found:", user)

    # Insert a new record and commit
    db.insert('logs', message='User 1 logged in')
    db.commit()

📚 Documentation & Deep Dives

For in-depth guides, complete API listings, and developer documentation, explore our documentation suite:

  • User Guide & Manual: Comprehensive walkthrough covering configuration, connection pooling, transactions, raw SQL, CRUD helpers, bulk operations, stored procedures, and row factories.
  • API Reference: Full technical reference of all classes, methods, parameters, and exceptions.
  • Architecture & Internals: Component mapping, lifecycle workflows, and security architecture.
  • Developer & Contributor Guide: Setup instructions, testing guidelines, and conventions for contributors.
  • Changelog: Release history, breaking changes, and migration notes.

🧪 Testing

  • The standard suite and four stress tests passed on Linux across all 15 combinations of Python 3.10–3.14 and PostgreSQL 16–18.
  • Stress tests cover sequential and parallel CRUD, batch operations, SQL and fetch helpers, functions, procedures, metadata, transactions, error recovery and connection pool reuse.
  • These tests do not cover every scenario, sustained load, multiple processes, Windows or macOS. See the Developer Guide for results and limitations.

👤 Author & License

  • Author: Marcus Gros
  • Copyright: 2026 Marcus Gros
  • License: MIT

Have fun building fast, secure PostgreSQL applications with Caddix! 🐘


Logo AI-generated via perchance.org

Metadata

Release files for caddix 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for caddix 1.1.1
File Size Uploaded Provenance Actions
caddix-1.1.1.tar.gz 170.4 kB With provenance Details for caddix-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for caddix 1.1.1
File Interpreter ABI Platform Actions
caddix-1.1.1-py3-none-any.whl Python 3 none any Details for caddix-1.1.1-py3-none-any.whl

Total release size: 188.3 kB

Release files / caddix-1.1.1.tar.gz

Download URL caddix-1.1.1.tar.gz
Size 170.4 kB
Tags Source
SHA-256 checksum
How to use checksums
59f4b7ab457f79c07b6e85a999ed312cf898874c586a0ea4223205d37ba50061
BLAKE2b-256 checksum
How to use checksums
f478ca761e966f87515a0956eebd89a86cc925af3d74ec492627f24f507d6391
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / caddix-1.1.1-py3-none-any.whl

Download URL caddix-1.1.1-py3-none-any.whl
Size 17.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ddafeb2b2c2061df867edd20cfdd106ece14c605c2e8c588c051663ea2cf36f
BLAKE2b-256 checksum
How to use checksums
789233712ff3edd043a712630f678ce98c6a78be62f5c18f2bbd54242a2031cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for caddix 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for caddix-1.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page