Skip to main content
DjanQuiltDB

djanquiltdb-plugin-postgres-objects

PyPI Supported Python versions Supported Django versions Supported PostgreSQL versions CI Documentation Coverage BSD-3-Clause licence

django-postgres-objects declares Postgres functions and views as classes and lets makemigrations manage them. DjanQuiltDB shards a database across schemas and nodes. This library serves as a compatibility layer between them, allowing you to mark declarative functions and views as sharded:

# example/functions.py
from djanquiltdb.decorators import public_function
from postgres_objects import Function


@public_function()
class AllUppercase(Function):
    arguments = 'input TEXT'
    returns = 'TEXT'
    volatility = 'IMMUTABLE'
    strict = True
    parallel = 'SAFE'
    body = """
        BEGIN
            RETURN UPPER(input);
        END;
    """

Install it through DjanQuiltDB’s extra:

pip install djanquiltdb[postgres-objects]

The installation guide describes each step in full. postgres_objects goes in INSTALLED_APPS, and the POSTGRES_OBJECTS setting names the module of each app that declares its functions and the module that declares its views:

# settings.py
INSTALLED_APPS = [
    ...
    'djanquiltdb',
    'postgres_objects',
    ...
]

POSTGRES_OBJECTS = {
    'FUNCTIONS_MODULE_PATH': 'functions',
    'VIEWS_MODULE_PATH': 'db_views',
}

The decorators are importable from djanquiltdb.decorators beside the decorators of the models. Functions get @public_function(), @mirrored_function() and @sharded_function(), and views get @public_view(), @mirrored_view() and @sharded_view(). A declaration without one of these decorators is public, and fails the system check djanquiltdb_plugin_postgres_objects.E001, so that every declaration says where it belongs.

Full documentation is at https://djanquiltdb.readthedocs.io/en/latest/plugins/postgres-objects/index.html.

Development

This package is developed in the DjanQuiltDB repository beside djanquiltdb itself. Tests run through tox against the Postgres containers in the repository’s docker-compose.yml; see DOCKER.md at the repository root:

docker compose run --rm test tox

Requirements

  • Python 3.12 to 3.15

  • Django 5.2, 6.0 or 6.1

  • PostgreSQL 17 or 18

  • djanquiltdb 4.5.0 or newer 4.x

  • django-postgres-objects 1.1.0 or newer 1.x

Metadata

Release files for djanquiltdb-plugin-postgres-objects 1.2.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 djanquiltdb-plugin-postgres-objects 1.2.0
File Size Uploaded Provenance Actions
djanquiltdb_plugin_postgres_objects-1.2.0.tar.gz 33.0 kB With provenance Details for djanquiltdb_plugin_postgres_objects-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for djanquiltdb-plugin-postgres-objects 1.2.0
File Interpreter ABI Platform Actions
djanquiltdb_plugin_postgres_objects-1.2.0-py3-none-any.whl Python 3 none any Details for djanquiltdb_plugin_postgres_objects-1.2.0-py3-none-any.whl

Total release size: 43.7 kB

Release files / djanquiltdb_plugin_postgres_objects-1.2.0.tar.gz

Download URL djanquiltdb_plugin_postgres_objects-1.2.0.tar.gz
Size 33.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5fd6f2a68a73f86c082d06c87064113a4c6095ffb2b6aa0b780a05890dd15354
BLAKE2b-256 checksum
How to use checksums
fa97a58f6ec4624616d38a6f5a4cc787a2e39f52b7cfe63bda44318ff1bd9b77
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 12, 2026.

Transparency log

Release files / djanquiltdb_plugin_postgres_objects-1.2.0-py3-none-any.whl

Download URL djanquiltdb_plugin_postgres_objects-1.2.0-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b911b97f9486b18c3a04fcf69cc88850302ccb8278212eaead712b339a13f4a4
BLAKE2b-256 checksum
How to use checksums
31aba79044ac99375ec4aaa233db4a2abe1a84deff4fb558741c9ec7e28058af
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 12, 2026.

Transparency log

Security for djanquiltdb-plugin-postgres-objects 1.2.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 djanquiltdb_plugin_postgres_objects-1.2.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 12, 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