skillfed

lockfile

Platform-independent file locking module

lockfile Permissive license Abandoned v0.12.2 released

Install

lockfile on PyPI

pip

pip install lockfile

uv

uv add lockfile

poetry

poetry add lockfile

Package facts

License not declared (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 3,914 days since the last release
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: lockfile-0.12.2-py2.py3-none-any.whl

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: Microsoft :: Windows :: Windows NT/2000Operating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Topic :: Software Development :: Libraries :: Python Modules

About lockfile

from the package's own PyPI description — quoted content, verbatim

Note: This package is deprecated. It is highly preferred that instead of using this code base that instead fasteners or oslo.concurrency is used instead. For any questions or comments or further help needed please email openstack-dev_ and prefix your email subject with [oslo][pylockfile] (for a faster response).

.. _fasteners: https://pypi.python.org/pypi/fasteners .. _oslo.concurrency: http://docs.openstack.org/developer/oslo.concurrency/ .. _openstack-dev: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

The lockfile package exports a LockFile class which provides a simple API for locking files. Unlike the Windows msvcrt.locking function, the fcntl.lockf and flock functions, and the deprecated posixfile module, the API is identical across both Unix (including Linux and Mac) and Windows platforms. The lock mechanism relies on the atomic nature of the link (on Unix) and mkdir (on Windows) system calls. An implementation based on SQLite is also provided, more as a demonstration of the possibilities it provides than as production-quality code.

Note: In version 0.9 the API changed in two significant ways:

  • It changed...

Read as markdown · JSON record · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Provides a cross-platform file locking API that works identically on Unix and Windows systems using atomic filesystem operations.

Installation is frictionless with no runtime dependencies, but the package is abandoned—last released in 2015 with no maintenance activity for over a decade. Consider fasteners or oslo.concurrency as actively maintained alternatives.

Licensed under MIT (permissive), allowing free use and modification with minimal restrictions.

Usage

pip install lockfile==0.12.2

from lockfile import LockFile
lock = LockFile('/tmp/mylock')
with lock:
    # critical section

Package is deprecated and unmaintained since 2015; production use is not recommended.

Verdict: While lockfile installs easily with zero dependencies and carries a permissive MIT license, it is explicitly deprecated and abandoned for over a decade. The maintainers themselves recommend fasteners or oslo.concurrency instead. Use only in legacy systems where replacement is infeasible.

Needs verification

  • Whether the MIT license is explicitly declared in package metadata (license_raw is empty despite license_treatment being permissive)
  • Current compatibility with Python 3.10+ given classifiers only mention up to Python 3.3
file locking cross-platformmutex lock filesplatform independent file lockconcurrent file access controlatomic file lockingunix windows file locklockfile api

Similar packages