Skip to main content

django-overlay

A writable Django model layered on top of a read-only table you don't own — one model to query, no COALESCE/FULL OUTER JOIN at read time.

The problem

You have a big shared read-only table (a vendor import, a third-party dataset) and a small table of tenant edits on top of it. You want one Django model to query, writes landing only in your own table, an edit that copies the row over on first touch, and a foreign key that can still point at it even though Postgres can't put a real FK on a view.

This is OverlayFS applied to Postgres: a writable "upper" table merged with one read-only "lower" table into one "merged" view. Each overlay model has exactly one source table, though which physical table that is can be resolved per tenant — a single, tenant-scoped source, not a union of several.

from django.db import models

from django_overlay.models import OverlayMeta, OverlayModel
from django_overlay.sources import SourceTable


class Person(OverlayModel):
    first_name = models.CharField(max_length=100)

    class OverlayMeta(OverlayMeta):
        @staticmethod
        def get_source():
            return SourceTable(schema="external_source", table="people")


Person.objects.create(first_name="Jane")  # goes straight into the writable table

See docs/INDEX.md for everything else — usage, how it works, ids, uniqueness, deletion, migrations, and running the tests.

Metadata

Release files for django-overlay 0.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 django-overlay 0.1.0
File Size Uploaded Provenance
django_overlay-0.1.0.tar.gz 107.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-overlay 0.1.0
File Interpreter ABI Platform
django_overlay-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 134.9 kB

Release files / django_overlay-0.1.0.tar.gz

Download URL django_overlay-0.1.0.tar.gz
Size 107.5 kB
Tags Source
SHA-256 checksum
How to use checksums
498da789935aea3c5cb9525dafb67fb3c06a6c539c27b9424eb4031635b76c75
BLAKE2b-256 checksum
How to use checksums
5267244e7192993cf62071de22d7249bcf4240f2353faa801c2f6ff0c90c9586
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 26, 2026.

Transparency log

Release files / django_overlay-0.1.0-py3-none-any.whl

Download URL django_overlay-0.1.0-py3-none-any.whl
Size 27.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43d8debbb180fe7a7ecab297b1bd6fd392df45a82120c58f9c339faa286a2ab7
BLAKE2b-256 checksum
How to use checksums
6c1435ae91a5b8271c01e75921bcdf70e0a6a403b3b81793957ae2178e63be05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 26, 2026.

Transparency log

Security for django-overlay 0.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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_overlay-0.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 Jul 26, 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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