No project description provided
Project description
PG MUTEX
Python wrapper around Postgres pg_advisory_lock and pg_try_advisory_lock functions. It is possible, thanks to a common connection to the database, to block certain pieces of python code by different python processes, on different nodes.
Installation
pip install pg-mutex
Usage
from mutex import mutex
with mutex(connection, ['param1', 'param2']):
# here is code that is guaranteed to be executed by only one process, even on different nodes
pass
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pg-mutex-1.0.2.tar.gz
(1.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pg-mutex-1.0.2.tar.gz.
File metadata
- Download URL: pg-mutex-1.0.2.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6a06b76a73a0e393b401b6f673cc8078fc88e02a49655a88e089102d25a6b5e
|
|
| MD5 |
513617c2dccfca0e38aec5a0c07b950c
|
|
| BLAKE2b-256 |
9742ba3a07376a1995be3644fce7e4f60ff8c5bc50792e21a39c78d2ca7cc262
|
File details
Details for the file pg_mutex-1.0.2-py3-none-any.whl.
File metadata
- Download URL: pg_mutex-1.0.2-py3-none-any.whl
- Upload date:
- Size: 2.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77a60a429652c59ebb139f086a7fd5fd4fd8356d871bdc30c9d38dab56efec78
|
|
| MD5 |
e48bc48e2fadf4c0ec41b9fc5e08e7b6
|
|
| BLAKE2b-256 |
657d1b9f46975d504958a66920683a61a6cc54a22c6dcf2cf3ce96f4656c29ac
|