Giter Site home page Giter Site logo

pylockfile's Introduction

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

pylockfile's People

Contributors

smontanaro avatar jd avatar dhellmann avatar gdisantis24 avatar schlomo avatar advanced-security-actions-deployer[bot] avatar

Watchers

Sascha Boerger avatar Timur Khamrakulov avatar Björn Voß avatar James Cloos avatar Jürgen Schmidt avatar Stefan Nordhausen avatar Felix Maximilian Möller avatar Sebastian Herold avatar Arne Hilmann avatar Jan Brennenstuhl avatar Marco Hoyer avatar Ravi Yadav avatar highjagger avatar Christian Wernitz avatar Sven Schindler avatar Sebastian Spoerer avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.