Django Super Deduper
A collection of classes and utilities to aid in de-duping Django model instances.
Requirements
Python 3.6
Django 1.11
Install
pip install django-super-deduper
Usage
Merging Duplicate Instances
By default any empty values on the primary object will take the value from the duplicates. Additionally, any related one-to-one, one-to-many, and many-to-many related objects will be updated to reference the primary object.
> from django_super_deduper.merge import MergedModelInstance
> primary_object = Model.objects.create(attr_A=None, attr_B='')
> alias_object_1 = Model.objects.create(attr_A=X)
> alias_object_2 = Model.objects.create(attr_B=Y)
> merged_object = MergedModelInstance.create(primary_object, [alias_object_1, alias_object_2])
> merged_object.attr_A
X
> merged_object.attr_B
Y
Improvements
Support multiple merging strategies
Recursive merging of related one-to-one objects
Logging
This package does have some rudimentary logging for debugging purposes. Add this snippet to your Django logging settings to enable it:
LOGGING = {
'loggers': {
'django_super_deduper': {
'handlers': ['console'],
'level': 'DEBUG',
},
},
}
References
Metadata
Release files for django-super-deduper 0.1.4
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-super-deduper-0.1.4.tar.gz | 9.7 kB | Without provenance | Details for django-super-deduper-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_super_deduper-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for django_super_deduper-0.1.4-py3-none-any.whl |
Total release size: 15.2 kB
Release files / django-super-deduper-0.1.4.tar.gz
| Download URL | django-super-deduper-0.1.4.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e88cd3f954d44feef6c06d44267a17f289cc65f42eb802b44091ec7e50e5f36c
|
|
BLAKE2b-256 checksum How to use checksums |
9a94b943a991c8348fc7a9d0f7894a8cab7087a477d4651a7e02c7dd099b1fa9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.0
|
Release files / django_super_deduper-0.1.4-py3-none-any.whl
| Download URL | django_super_deduper-0.1.4-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7e0b971e917ef4ac28a1f40e5bf3c0eb66f4d09ca04c079654333e6da0e3008
|
|
BLAKE2b-256 checksum How to use checksums |
c82a9a10418648cb439acc6c9677579e7753ff5f70cb9cb831dfa5c56f42c643
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.0
|
Security for django-super-deduper 0.1.4
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.