django-pglocks
DEPRECATED — consolidated into django-pgware. Context managers for PostgreSQL advisory locks in Django.
Decision gist · record as of 2026-08-14
No. This package is deprecated and explicitly directs users to django-pgware. Install django-pgware directly instead. If you have existing code using django-pglocks, version 2.1.0 can serve as a temporary bridge to ease migration, but it should not be the final destination—update your imports to use django-pgware's django_pg_utils module.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Django and PostgreSQL; Python 3.10 or later.
- Low friction to install, but the package is explicitly deprecated and no longer maintained.
- Version 2.1.0 is a final compatibility shim that re-exports from django-pgware with deprecation warnings; new projects should use django-pgware directly.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects—though this is moot given the package's deprecated status.
last release 2026-06-21 (54 days) · last repo commit 2026-06-21 · 111 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 130,280 downloads/mo, #11,645 on PyPI
Alternatives
Verify before relying
pip install django-pglocks
from django_pglocks import advisory_lock
with advisory_lock('my_lock_name'):
# Critical section protected by PostgreSQL advisory lock
pass- Whether existing code using django-pglocks will continue to work without modification after the deprecation period ends.
- Performance characteristics of advisory locks under high concurrency in the underlying django-pgware implementation.
What it is and what it does
django-pglocks wraps PostgreSQL advisory locks as Django context managers, allowing you to protect critical sections of code from concurrent access using database-level locking. It was originally designed to serialize operations across multiple application instances without explicit distributed locking infrastructure.
As of version 2.1.0, this package is deprecated and serves only as a compatibility shim. Its functionality has been consolidated into django-pgware, which provides the same advisory_lock and async_advisory_lock exports under a different import path. The package will not receive further updates; it exists only to ease migration for existing users.
Use it for
- Migrate legacy code from django-pglocks to django-pgware by installing 2.1.0 as an intermediate step and addressing deprecation warnings.
- Protect critical database operations from concurrent execution across multiple Django application instances using PostgreSQL locks.
- Serialize access to shared resources (e.g., file uploads, report generation) without deploying a separate distributed lock service.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
This package is deprecated and explicitly directs users to django-pgware. Install django-pgware directly instead. If you have existing code using django-pglocks, version 2.1.0 can serve as a temporary bridge to ease migration, but it should not be the final destination—update your imports to use django-pgware's django_pg_utils module.
Install
django-pglocks on PyPI
Before you install
Low friction to install, but the package is explicitly deprecated and no longer maintained. Version 2.1.0 is a final compatibility shim that re-exports from django-pgware with deprecation warnings; new projects should use django-pgware directly.
Requires Django and PostgreSQL; Python 3.10 or later.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects—though this is moot given the package's deprecated status.
Quickstart
pip install django-pglocks
from django_pglocks import advisory_lock
with advisory_lock('my_lock_name'):
# Critical section protected by PostgreSQL advisory lock
pass
Verify before relying
- Whether existing code using django-pglocks will continue to work without modification after the deprecation period ends.
- Performance characteristics of advisory locks under high concurrency in the underlying django-pgware implementation.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesdjango-pgwaredjango |
| Maintenance | Actively maintained 54 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 130,280 / month, #11,645 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 7 - InactiveEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Software Development |
Evidence: django_pglocks-2.1.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “postgresql advisory locks django”
- django-pglocksProvides PostgreSQL advisory locks for Django applications through…
- django-pglockProvides Postgres advisory locks, table locks, and lock management…
- django-pg-zero-downtime-migrationsProvides a Django database backend for PostgreSQL that executes…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also django-pglock · django-pg-zero-downtime-migrations · django-pgmigrate · django-postgres-copy · django-waffle · PyMySQLLock · django-concurrency · django-dirtyfields · django-citext · django-constance