Django json datadump object filtering
Project description
Django’s dumpdata management command allows you to dump objects from a given application, but sometimes you’ll want to extract all objects of a given model from a much larger file containing objects from many models.
This package provides the jsonfilter.py commandline utility, which will allow you to do just that.
Ultimately the idea would be to also add options to be able to search on different model fields to extract the objects you want before importing them again into the database.
Although it loads the entire json in memory, it’s actually quite fast. On a 41.6MB json file containing 131515 objects, it takes about 3s to extract 10341 objects of a given type. The 3s is actually fairly constant, however many objects there are of the model it’s extracting.
See jsonfilter.py --help for usage.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-jsonfilter-0.1.tar.gz
.
File metadata
- Download URL: django-jsonfilter-0.1.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 716ff4ca5066c198e5d5348951a48365c589f73c8eb2ebe11f9920252a6c6e62 |
|
MD5 | 8f97c8cb339865d01867f42ae7a7e9f9 |
|
BLAKE2b-256 | 1e3210de8c99e87bd0b59d96862065c5f0b8c0626bb3fff9143ce00e6fd5c94d |
Provenance
File details
Details for the file django-jsonfilter-0.1.linux-i686.exe
.
File metadata
- Download URL: django-jsonfilter-0.1.linux-i686.exe
- Upload date:
- Size: 65.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fcc75a2229c5392d9c383c802e0654d952e4cdb896000d940fb0d591907006f |
|
MD5 | 8bd5829df2cd5d5d053318dae6b82509 |
|
BLAKE2b-256 | 085854c461676b43b493ba8f982686bd46c3cd8096c4d237b64005510be81e8a |