{"categories":[{"label":"WWW/HTTP","url":"https://skillfed.io/packages/category/internet-www-http/5"},{"label":"Dynamic Content","url":"https://skillfed.io/packages/category/internet-www-http-dynamic-content/3"}],"enrichment":{"capability":"Iterates over large Django QuerySets in configurable chunks to avoid loading entire result sets into memory at once.","skillfed_tags":["django-orm","memory-efficient","abandoned"],"use_cases":["Bulk-update large numbers of records in a Django model without exhausting available RAM.","Export large datasets to CSV or other formats by processing rows in manageable batches.","Perform background tasks on all records in a table by chunking the queryset and dispatching each chunk to a task queue.","Migrate or transform data from one table to another when the result set is too large to fit in memory.","Generate reports or analytics by iterating over a large queryset in controlled increments."],"what_it_does":"django-chunkator provides a simple iterator that breaks a Django QuerySet into smaller batches, fetching and processing them one chunk at a time instead of loading the entire result set into memory. This is useful when you need to process large numbers of records but don't have enough RAM to hold them all at once. The package exports two main functions: chunkator() for iterating over individual items in chunks, and chunkator_page() for working with entire pages of results as lists.\n\nThe tool works by repeatedly querying the database with offset and limit, fetching each batch sequentially. It requires that your model has a unique primary key (which Django provides by default) and works with both standard integer PKs and UUIDs. The package has been tested with PostgreSQL and SQLite. Note that chunking does not speed up the overall process\u2014it trades a single large query for multiple smaller ones, with the main benefit being reduced memory consumption during iteration.","worth_installing":"No. The package is abandoned (last release 2020-06-22, last commit 2022-07-11) and untested against Django versions beyond 3.0. Compatibility with modern Django and Python versions is unverified. For new projects, consider using Django's built-in QuerySet.iterator() with chunk_size parameter, which provides similar functionality and is actively maintained."},"id":"django-chunkator","links":{"html":"https://skillfed.io/packages/django-chunkator","md":"https://skillfed.io/packages/django-chunkator.md","pypi":"https://pypi.org/project/django-chunkator/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2020-06-22","license_spdx":null,"license_treatment":"permissive","name":"django-chunkator","python_support":"unspecified","summary":"Chunk large QuerySets into small chunks, and iterate over them without killing your RAM."},"popularity":{"monthly_downloads":178291,"position":10198,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.0.0"}
