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.

👤 Author & License

  • Author: Marcus Gros (marcus-gros@freenet.de)
  • 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.0

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.0
File Size Uploaded Provenance Actions
caddix-1.1.0.tar.gz 162.1 kB With provenance Details for caddix-1.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 176.7 kB

Release files / caddix-1.1.0.tar.gz

Download URL caddix-1.1.0.tar.gz
Size 162.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f640eece5f65ed32c7b0e81428232f88cf3ed71b905d5f992748ad6f74eff152
BLAKE2b-256 checksum
How to use checksums
90a9f7508caa1e3161c60c3dc9479cddbef6ebdf7b7185d42ebf6bfd91fd2de5
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 21, 2026.

Transparency log

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

Download URL caddix-1.1.0-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d287a67100c378fc10bdc9d3e513f79bc02e674864b959711ddb4c95bf725d9f
BLAKE2b-256 checksum
How to use checksums
9ea3c7fbaf24d36a4ffbaaef9c7ee22b9656dd61e6c83c0ff6bca0a3c4406880
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 21, 2026.

Transparency log

Security for caddix 1.1.0

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.0.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 21, 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