Skip to main content

Part QuerySets into small chunks.

Project description

Django Query Chunk

Django Query Chunk is used to split big queries into multiple chunks for prevent (too high) memory usage. The chunk function will split the query set into several isolated queries.

Requirements

  • Python: >=3.6
  • Django: >=2.0

Installation

pip install django-query-chunk

Usage

from query_chunk import chunk

chunk_size = 300

for book in chunk(Book.objects.all(), chunk_size):
    # process book

Project details


Download files

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

Files for django-query-chunk, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size django_query_chunk-0.0.1-py3-none-any.whl (2.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size django-query-chunk-0.0.1.tar.gz (1.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page