Django-Table-Sharding
Django table sharding is an app that will allow you to shard your database tables in the same database using a shard key or shard suffix.
Detailed documentation is in the “docs” directory.
Quick start
Add “django_table_sharding” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'django_table_sharding', ]
Every time migrations are run it will copy changes from the source table to the sharded tables.
Set the model manager to the models you want to shard into their own tables. Example:
objects = ShardManager()
The migration process will automatically find all sharded models and apply the new migrations.
Sharded models can have ForeignKeys, but other models cannot foreign key to the sharded models because original table is not used.
Sharded models cannot contain OneToOneField, or ManyToManyField, for same reason.
When running migrations the normal migration will run as normal, and then changes to source table, will be applied to all shards in the database.
Before deploying to production please make sure everything fits your needs.
Metadata
Release files for django-table-sharding 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-table-sharding-1.0.3.tar.gz | 15.3 kB | Without provenance | Details for django-table-sharding-1.0.3.tar.gz |
Release files / django-table-sharding-1.0.3.tar.gz
| Download URL | django-table-sharding-1.0.3.tar.gz |
|---|---|
| Size | 15.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e2fa63ed23364b01b81d0d92cfcafa1e91d43af684441234766f0c597166c8c
|
|
BLAKE2b-256 checksum How to use checksums |
bce2b964180ed1745c40f60e93abbffd1b6463585a1dff2f5c33c2f887173c1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7
|
Security for django-table-sharding 1.0.3
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.