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.5.tar.gz
(3.8 kB
view details)
Built Distribution
File details
Details for the file thlock-0.9.5.tar.gz
.
File metadata
- Download URL: thlock-0.9.5.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.1 Linux/5.4.109+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa9890410570476279b0b79ae977b8021fa6b9dc551d37b1fdac0de2bfda4a24 |
|
MD5 | 5031c14773ab361d84a6a38ac8277b10 |
|
BLAKE2b-256 | 1df89d64f73a4e7e265c02935bd66adcb73ed72fd118c03fcef25876fbcaa275 |
File details
Details for the file thlock-0.9.5-py3-none-any.whl
.
File metadata
- Download URL: thlock-0.9.5-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.1 Linux/5.4.109+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f115c916fe921a70dbb5d1ff89f4ad2a4e4cab34666a43776a9efc31b72842a7 |
|
MD5 | fa0abf99a8b7d50d370fd562e725a85c |
|
BLAKE2b-256 | 0b805f0043bba588a381b59870266e4d468cb11339d7861450d5b083eb955718 |