Skip to main content

Chunk large querysetsinto small chunks, and iterate over them without killing your RAM.

Project description

Chunk large querysetsinto small chunks, and iterate over them without killing your RAM.

https://travis-ci.org/novafloss/django-chunkator.svg

Usage:

from chunkator import chunkator
for item in chunkator(LargeModel.objects.all(), 200):
    do_something(item)

This tool is intended to work on Django querysets.

Warnings:

  • This toolkit will only work if your models use “pk” as their primary key and that this primary key is an integer (no UUID, or such),

  • This will not accelerate your process. Instead of having one BIG query, you’ll have several small queries. This will save your RAM instead, because you’ll not load a huge queryset result before looping on it.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-chunkator-0.0.2.tar.gz (2.5 kB view details)

Uploaded Source

File details

Details for the file django-chunkator-0.0.2.tar.gz.

File metadata

File hashes

Hashes for django-chunkator-0.0.2.tar.gz
Algorithm Hash digest
SHA256 9a117ee84ff9e2c2f9dcb33cb9980b23faa26e259938bc12c2b8f7f73ec075b7
MD5 2bd14d254e68ff3b77153a60c3710cd5
BLAKE2b-256 1ed42bb7bf0129724c9d4ba06b68d9433820cf1f9272f915cbbb828dcf837b98

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page