This is a Django data dump script generator. It either generates a script to call dumpdata or does dumpddata itself.
It may produce command line scripts usable within a Makefile or as a simple bash scripts to dump or load data with Django from the many app names you give it.
It need a dependancies map to know what is required to be dumped.
Maps
Currently it only have two maps one for “djangocms-2” and one for “djangocms-3” projects, and so it only knows about:
Django contrib auth;
Django sites;
emencia.django.countries;
contact_form;
DjangoCMS and its common plugins;
Zinnia;
Porticus;
South;
django-tagging;
django-taggit;
easy-thumbnails;
django-filer;
django-google-tools;
emencia-django-socialaggregator;
emencia-django-slideshows;
Note : Many app depends on Django’s content types but we don’t bother because it is automatically filled by Django and we should never try to dump/load it.
Format
Dumps order does matter to respect module’s dependancies;
model or dependancy names can be string or either a list of names, take care that string is splitted on white spaces, if you use excude flag like ‘-e’ with your model names, always use a list;
Circular dependancies is possible;
Sample map :
[
('DUMP_NAME_KEY', {
'use_natural_key': true,
'models': 'mymodel',
'exclude_models': 'my_excluded_model',
'dependancies': [],
}),
]
Where :
- DUMP_NAME_KEY
Is the dump entry name, can be anything but commonly this is the app package name, this is what is used in embedded map files.
- use_natural_key
A boolean to define if the dump can use natural key, if not defined, a dump entry is assumed to support natural key.
- models
Is either a string of the model name or a list model names. Django accept either an app name from which it will take all its models, or a specific app model.
- exclude_models
Is either a string of the model name or a list model names. It will exclude all those models from the dumpdata command.
- dependancies
Either a string of another dump names to depends of. They will be taken also even if they haven’t been explicitely requested from user.
Codec
DrDump will use a dump codec to tranform the list of dump instructions (models or apps to dump, excluded models, usage of natural keys) into actions: actual call of management commands or script generation.
Loading data
DrDump will generate a manifest file with the list of the fixtures it has generated.
DrDump can automate the process of loading the data it has generated. The Python module drdump.load can load the manifest:
python -m drdump.load <manifest file>
The management command dr_load does the same thing:
manage.py dr_load <manifest>
Django
DrDump provides a management command to launch the dump or generate the dump commands:
manage.py dr_dump ...
It will take command line arguments that defaults to settings.
- DRDUMP_MAP_FILE
The path to the map file
- DRDUMP_OTHER_APPS
A boolean that decides if all unlisted apps are also dumped
- DRDUMP_EXCLUDE_APPS
A list of applications or models to exclude from the dump
- DRDUMP_OPTIONS
The options of the dump codec
Metadata
Release files for dr-dump 1.1.5
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 |
|---|---|---|---|---|
| dr-dump-1.1.5.tar.gz | 11.0 kB | Without provenance | Details for dr-dump-1.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dr_dump-1.1.5-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for dr_dump-1.1.5-py2.py3-none-any.whl |
Total release size: 24.9 kB
Release files / dr-dump-1.1.5.tar.gz
| Download URL | dr-dump-1.1.5.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03fa27fdbbb841f20b2f672572ef42a85a25997a2b7a37857ca3b13831cbed58
|
|
BLAKE2b-256 checksum How to use checksums |
62cd94c17b1fb5d6df2aad9b4a80a89d284a09b58e21fbaf90c7f24fe24bc224
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
|
Release files / dr_dump-1.1.5-py2.py3-none-any.whl
| Download URL | dr_dump-1.1.5-py2.py3-none-any.whl |
|---|---|
| Size | 13.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
dc3a4e48713cb9ec0db66bc270eb2c1e4282c14f404695156124e452c6ef4341
|
|
BLAKE2b-256 checksum How to use checksums |
eb6dcc9d9cff410aaea3e6d88795388903d8a2c9e573d06b2e498fe3c45f7f66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
|
Security for dr-dump 1.1.5
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.