$npx skillfedfor your agent

django-pglocks

DEPRECATED — consolidated into django-pgware. Context managers for PostgreSQL advisory locks in Django.

SkipPyPI Software DevelopmentReleased Jun 2026130.3K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — django_pglocks-2.1.0-py3-none-any.whl
v2.1.0 · released 2026-06-21 · Python >=3.10 · 2 runtime deps: django-pgware, django

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

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.
Same gist for agents: .md · .json

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.

Skip

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

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
django-pgwaredjango
MaintenanceActively maintained 54 days since the last release
Last repo commit
First released
Downloads130,280 / month, #11,645 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone 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

Capabilities
postgresql advisory locks djangopostgres lock context managerdjango database lockingpostgresql concurrent access controldjango pgware migration
Topics
deprecatedpostgresql-locksmigration-shim

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”

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

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.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

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.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

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.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

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.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

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.

permissive licensepure Python
323.3Mdownloads / mo

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