TangledHub thlock library
Project description
thlock
Overview
TangledHub library for etcd_lock with a focus on asynchronous functions
Licencing
thlock is licensed under the BSD license. Check the LICENSE for details
Installation
pip install thlock
Testing
docker-compose build thlock-test ; docker-compose run --rm thlock-test
Building
docker-compose build thlock-build ; docker-compose run --rm thlock-build
Publish
docker-compose build thcrypto-lock ; docker-compose run --rm -e PYPI_USERNAME=__token__ -e PYPI_PASSWORD=__SECRET__ thlock-publish
Usage
setup
Create instance of EtcdLock
HOST = 'etcd-test'
PORT = 2379
# create instance of EtcdLock
lock = EtcdLock(host=HOST, port=PORT, name='lock-0')
Acquire lock
HOST = 'etcd-test'
PORT = 2379
# create instance of EtcdLock
lock = EtcdLock(host=HOST, port=PORT, name='lock-0')
# acquire lock
await lock.acquire()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
thlock-0.9.0.tar.gz
(3.5 kB
view details)
Built Distribution
File details
Details for the file thlock-0.9.0.tar.gz
.
File metadata
- Download URL: thlock-0.9.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.10.1 Linux/5.4.109+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aebd12b1049b0642b1ad937af2abeff1721cb638a13a2756a7648a8525a91f4d |
|
MD5 | 398bd539431ad8e6dd594ba008dccaf3 |
|
BLAKE2b-256 | 922e830e533c51b4159bb275f1d4f472fa66cf874c3cfc3cc3ba3be38fe38f1d |
File details
Details for the file thlock-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: thlock-0.9.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.10.1 Linux/5.4.109+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e748ce5d9963263d7f5618644fb1c1fdfed5c72666d2cb3b7953227f0900e7e |
|
MD5 | 33b1577759d96ced23b0767b05c2a63d |
|
BLAKE2b-256 | 74b469fcb4abf7da5f14da94ff301e1fafcf1fee5d60a55f42844e7bdca3112f |