Skip to main content

A platform independent file lock.

Project description

This package contains a single module, which implements a platform independent file locking mechanism for Python.

The lock includes a lock counter and is thread safe. This means, when locking the same lock object twice, it will not block.

import filelock

lock = filelock.FileLock("my_lock_file")

with lock:
        pass

try:
        with lock.acquire(timeout = 10):
                pass
except filelock.Timeout:
        pass

Documentation

The full documentation is available on readthedocs.org.

Contributions

Contributions are always welcome. Never hesitate to open a new issue.

License

This package is public domain.

Project details


Release history Release notifications | RSS feed

This version

2.0.7

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

filelock-2.0.7.tar.gz (5.0 kB view details)

Uploaded Source

File details

Details for the file filelock-2.0.7.tar.gz.

File metadata

  • Download URL: filelock-2.0.7.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for filelock-2.0.7.tar.gz
Algorithm Hash digest
SHA256 bdff3edefb9d1df7d40ce9b653adfafd4ba7e2105bc8de78c65aa03641f8ee16
MD5 27962b06bd79282d3aa76122b5bdcbd8
BLAKE2b-256 48f077ece9df4df7924ad0d9ba678c8602dd1114348e1c714e4cd10d9fc35ff0

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page