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.4.tar.gz
(3.7 kB
view details)
Built Distribution
File details
Details for the file thlock-0.9.4.tar.gz
.
File metadata
- Download URL: thlock-0.9.4.tar.gz
- Upload date:
- Size: 3.7 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 | cf7b723f85679ed89987b81a1c0ab0ce0d70a2fb097eed644d366d51d7dbb351 |
|
MD5 | 99bf7d0d0827dbc35bc5831c45523cb1 |
|
BLAKE2b-256 | 1adca8437d6be5827a6388cce7fb2217186ba2b8453ec69eb6910ecfb3201f0c |
File details
Details for the file thlock-0.9.4-py3-none-any.whl
.
File metadata
- Download URL: thlock-0.9.4-py3-none-any.whl
- Upload date:
- Size: 3.8 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 | 2f21eeb3449bf53d3f788b28e5eccc68fe360240b3896b9e4cdd8fe9ddd0b53a |
|
MD5 | bc214fab10fd37f1b58f99bdd8694056 |
|
BLAKE2b-256 | 994670a9f8293d3c58c20a2b22f568b5ad30f1d64bced67014348342d888edb5 |