{"categories":[{"label":"Database","url":"https://skillfed.io/packages/category/database/3"}],"enrichment":{"capability":"Provides gapless sequence generation for Django models, ensuring no gaps in integer primary keys even when transactions roll back.","skillfed_tags":["django-extension","sequence-generation","compliance"],"use_cases":["Generate invoice numbers that must be sequential and gapless for accounting compliance and audit trails.","Create sequential case or ticket IDs in support systems where gaps would confuse users or violate reporting requirements.","Produce sequential receipt or order numbers in point-of-sale or e-commerce systems with strict numbering policies.","Maintain gapless sequence counters for regulatory or financial reporting where auditors expect continuous numbering.","Batch-generate a range of sequential IDs for bulk operations using get_next_values while preserving transaction guarantees."],"what_it_does":"django-sequences solves a compliance problem in Django applications: by default, Django's auto-incrementing primary keys can have gaps when transactions roll back, because most databases don't roll back their sequence counters for performance reasons. This happens on PostgreSQL, MySQL/MariaDB, Oracle, and SQLite. For use cases like accounting or invoicing where sequential, gapless numbering is legally or operationally required, these gaps are unacceptable.\n\nThe package provides a get_next_value function and a Sequence class that generate gapless integer sequences by leveraging database transaction integrity. You call get_next_value within a transaction, save its return value to the database in the same transaction, and the package guarantees no gaps. It supports multiple independent sequences, custom starting values, and looping sequences. The trade-off is that transactions calling get_next_value for the same sequence are serialized\u2014other callers block until the transaction completes\u2014so you should keep such transactions short.","worth_installing":"Yes, if you need gapless sequences for compliance or operational reasons. The package is stable (Production/Stable classifier), has no known vulnerabilities, and integrates cleanly into Django with minimal friction. The aging maintenance status is not a blocker\u2014the code is mature and the last commit is recent. The serialization trade-off is acceptable for most accounting and invoicing workloads where sequence calls are infrequent relative to overall transaction volume."},"id":"django-sequences","links":{"html":"https://skillfed.io/packages/django-sequences","md":"https://skillfed.io/packages/django-sequences.md","pypi":"https://pypi.org/project/django-sequences/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2024-01-31","license_spdx":null,"license_treatment":"permissive","name":"django-sequences","python_support":"supports_current","summary":"Generate gapless sequences of integer values."},"popularity":{"monthly_downloads":253098,"position":8527,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"3.0"}
