{"categories":[{"label":"Database","url":"https://skillfed.io/packages/category/database/2"}],"enrichment":{"capability":"Provides Postgres advisory locks, table locks, and lock management utilities for Django applications to prevent concurrent task execution and handle blocking locks.","skillfed_tags":["postgres-locking","concurrency-control","django-extension"],"use_cases":["Prevent duplicate execution of periodic background tasks or Celery jobs by wrapping them in advisory locks.","Lock an entire model during a transaction to ensure exclusive access for critical data updates.","Dynamically set Postgres lock timeouts to fail fast when lock acquisition takes too long.","Terminate blocking locks from migrations or high-priority code to avoid deadlock situations.","Query active and blocked locks via the PGLock and BlockedPGLock proxy models for monitoring."],"what_it_does":"django-pglock wraps Postgres's native locking mechanisms (advisory locks and table locks) as Django utilities, letting you prevent concurrent execution of code sections and manage lock contention. It provides decorators and context managers for application-level synchronization\u2014useful for ensuring background tasks don't overlap, locking entire models during transactions, and forcibly terminating blocking locks to prioritize critical code like migrations.\n\nThe package depends on django and django-pgactivity and exposes a management command for querying and killing locks from the CLI. It supports Python 3.10\u20133.14 and Django 4.2\u20136.0, with compatibility across Postgres 14\u201318 and both Psycopg 2 and 3.","worth_installing":"Yes, if you use Django with Postgres and need application-level locking or lock management. The low install friction, permissive license, and zero known vulnerabilities make it safe to adopt. The aging maintenance status (257 days since last release) is a minor concern but not a blocker\u2014the repository is active and the package is stable for current Django and Python versions."},"id":"django-pglock","links":{"html":"https://skillfed.io/packages/django-pglock","md":"https://skillfed.io/packages/django-pglock.md","pypi":"https://pypi.org/project/django-pglock/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-11-30","license_spdx":null,"license_treatment":"permissive","name":"django-pglock","python_support":"supports_current","summary":"Postgres locking routines and lock table access."},"popularity":{"monthly_downloads":1425714,"position":3916,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.8.0"}
