Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

File lock support for asyncio.

Project Description

aioflock: file lock support for asyncio (based on fcntl.flock)
==================================

.. image:: https://coveralls.io/repos/kolko/aioflock/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/kolko/aioflock?branch=master

.. image:: https://travis-ci.org/kolko/aioflock.svg?branch=master
:target: https://travis-ci.org/kolko/aioflock



Example:

.. code-block:: python

from aioflock import LockFilename
lock = LockFilename('/tmp/test_lock')
yield from lock.acquire()
..inside lock..
lock.release()



With stategment:

.. code-block:: python

from aioflock import LockFilename
with (yield from LockFilename('/tmp/test_lock')):
..inside lock..



Can use timeout:

.. code-block:: python

from aioflock import LockFilename, LockFilenameTimeout

try:
with (yield from LockFilename('/tmp/test_lock')):
with (yield from LockFilename('/tmp/test_lock', timeout=1)):
...newer here...
except LockFilenameTimeout:
...here...

Release History

This version
History Node

0.0.1

Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
aioflock-0.0.1.tar.gz
(3.0 kB) Copy SHA256 Hash SHA256
Source None Aug 28, 2015

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting