Metadata-Version: 2.4
Name: djanquiltdb
Version: 3.1.2
Summary: Library to shard a database on the hierarchy's top level table.
Author-email: DjanQuiltDB Project <djanquiltdb@portal42.net>, "Cloud Linux Software, Inc." <info@cloudlinux.com>, "Patchman B.V." <hello@patchman.co>
License-Expression: BSD-3-Clause
Project-URL: Homepage, https://github.com/DjanQuiltDB/djanquiltdb
Project-URL: Repository, https://github.com/DjanQuiltDB/djanquiltdb
Project-URL: Documentation, https://github.com/DjanQuiltDB/djanquiltdb/tree/master/docs
Project-URL: Changelog, https://github.com/DjanQuiltDB/djanquiltdb/blob/master/CHANGELOG.rst
Project-URL: Issues, https://github.com/DjanQuiltDB/djanquiltdb/issues
Keywords: django,database,sharding,postgresql,multi-tenant,horizontal-scaling
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Classifier: Framework :: Django
Classifier: Framework :: Django :: 6.0
Requires-Python: >=3.14
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: django<7.0,>=6.0
Requires-Dist: psycopg[binary]>=3.0.0
Requires-Dist: progressbar2
Provides-Extra: test
Requires-Dist: tox==4.12.1; extra == "test"
Requires-Dist: pluggy; extra == "test"
Requires-Dist: dj-database-url==2.1.0; extra == "test"
Requires-Dist: django-braces==1.15.0; extra == "test"
Requires-Dist: tblib; extra == "test"
Requires-Dist: filelock; extra == "test"
Requires-Dist: coverage; extra == "test"
Requires-Dist: PyYAML; extra == "test"
Provides-Extra: dev
Requires-Dist: djanquiltdb[test]; extra == "dev"
Requires-Dist: sphinx<10,>=8; extra == "dev"
Dynamic: license-file

DjanQuiltDB - Django Database Sharding
======================================

**DjanQuiltDB** is an extension to the Django web framework that provides helper functions to split a database based on
top level hierarchy. It is specifically designed to support horizontal sharding not just within a single database
cluster, but also across multiple database clusters, thus allowing you to scale database capacity both vertically and
horizontally as your dataset grows.

This library attempts to combine the best of as many worlds as possible. Tenant-specific data is kept in tenant-specific
PostgreSQL schemas, while data that is tenant-agnostic or shared can be kept in public schemas, so as to deduplicate.
There are helpers to split data off from one shard to another, to migrate a shard across nodes, to synchronize changes
across nodes, etc.

As the name suggests, this approach provides an interface to data, that may in reality be scattered across various
schemas in various database clusters, and presents it as a coherent and easily accessible patchwork of tables, resulting
in a database resembling a quilt.

Development
===========

To setup your development environment it is important to install the development requirements first::

    pip install -e .[dev]

Next, copy the example secrets file in the ``djanquiltdb`` directory and adjust the parameters::

    cp secrets.json.example secrets.json

Tests
-----

Tox can be used to run the test suite against multiple Python and Django versions::

    tox

Building
--------

Building a distribution requires the ``build`` package (``pip install build``).
To build both the source distribution and the wheel, simply run::

    python -m build

The results are then placed in the /dist folder

Documentation
-------------

Documentation can be found in the `/docs` directory. Build the documentation with::

    make -C docs html

Attribution
===========

This is an independently maintained fork of the patchman-django-sharding library originally created and maintained by
Patchman B.V. (2017-2023) and Cloud Linux Software, Inc. (2023-2025).
