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.3.tar.gz
(3.6 kB
view details)
Built Distribution
File details
Details for the file thlock-0.9.3.tar.gz
.
File metadata
- Download URL: thlock-0.9.3.tar.gz
- Upload date:
- Size: 3.6 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 | 19bfdfaa6f9f61f2dbea72f0542d631f956c9c25c9d27950a8af49a7feb16806 |
|
MD5 | 67ba9dd302c08790a12be52c11acecb7 |
|
BLAKE2b-256 | 66bf268dbd4f277ae844ed9e0429fb46d52090fa0024340088473e091e19a340 |
File details
Details for the file thlock-0.9.3-py3-none-any.whl
.
File metadata
- Download URL: thlock-0.9.3-py3-none-any.whl
- Upload date:
- Size: 3.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 | 599229ce1166366d6b35862ce55bddd8e15165358b48adb7cdff087090e506b4 |
|
MD5 | 1d17bad1cc23ccae58562275737bbfbc |
|
BLAKE2b-256 | 4599472179c36fdbde12b11e76fb4c7a57ab8b203c171a10d6902fea453df49b |