Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lockfile

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lockfile

Platform-independent file locking module

  • 0.12.2
  • PyPI
  • Socket score

Maintainers
1

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 from a module defining several classes to a package containing several modules, each defining a single class.

  • Where classes had been named SomethingFileLock before the last two words have been reversed, so that class is now SomethingLockFile.

The previous module-level definitions of LinkFileLock, MkdirFileLock and SQLiteFileLock will be retained until the 1.0 release.

To install:

python setup.py install

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc