--- id: lockfile version: "0.12.2" license: unclear license_treatment: permissive maintenance: abandoned --- # lockfile — Platform-independent file locking module License: permissive · Maintenance: abandoned · Popularity: top 1,000 on PyPI ## Install pip install lockfile uv add lockfile poetry add lockfile ## Description 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... ## AI interpretation — verify before relying Provides a cross-platform file locking API that works identically on Unix and Windows systems using atomic filesystem operations. 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. [View on SkillFed](https://skillfed.io/packages/lockfile) · [View on PyPI](https://pypi.org/project/lockfile/)