Skip to content

Django Query Chunk is used to split big queries into multiple chunks for prevent (too high) memory usage.

License

Notifications You must be signed in to change notification settings

imbue/django-query-chunk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Query Chunk

pypi

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

About

Django Query Chunk is used to split big queries into multiple chunks for prevent (too high) memory usage.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages