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.

Source Distribution

django-query-chunk-0.0.1.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

django_query_chunk-0.0.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file django-query-chunk-0.0.1.tar.gz.

File metadata

  • Download URL: django-query-chunk-0.0.1.tar.gz
  • Upload date:
  • Size: 1.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.3

File hashes

Hashes for django-query-chunk-0.0.1.tar.gz
Algorithm Hash digest
SHA256 3a60bbc00b6611062495e1c8f2a19a29642d91f0ee291363fc1410cf9627324a
MD5 ce530b877ca290d971c8633dd74257d5
BLAKE2b-256 f563719dcfdad77dc191df38b7b04321e53d140cb2482d57f51edd98e1e03aca

See more details on using hashes here.

File details

Details for the file django_query_chunk-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: django_query_chunk-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.3

File hashes

Hashes for django_query_chunk-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 38951dd31f65c7e2af3e94a065c85a2d2185a8d29c0301a7cf6e3ecce54e4203
MD5 b76ba42026d5bfc7aa884690687adece
BLAKE2b-256 ee4942057f157965dcaac0a80b167be50079d16c59b7460f2dc472cba2c13dee

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