semvec/pypi-packages huggingface dataset:
python-padlock 0.1.3
A Python library for distributed locking via a variety of backends.
License: MIT
Requires Python: <4.0,>=3.10

# Padlock

![PyPI - Python Version](https://img.shields.io/pypi/pyversions/python-padlock?style=flat-square)

Padlock is a Python library that provides a simple, asynchronous, and consistent API for distributed locking.


## Quick Start

### Installation

```bash
pip install python-padlock
```

### Basic Usage

```python
import asyncio

from padlock import LockManager, MemoryLockBackend


async def main():
    async with LockManager(MemoryLockBackend()) as manager:
        async with manager.lock('my-lock'):
            print('Lock acquired')
            await asyncio.sleep(5)
        print('Lock released')
```


You can find more examples in the [examples](examples/) directory.

## License
This project is licensed under MIT License.

## Support & Feedback
If you encounter any issues or have feedback, please open an issue. We'd love to hear from you!

Made with ❤️ by Emergent Methods