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.6.tar.gz
(3.9 kB
view details)
Built Distribution
File details
Details for the file thlock-0.9.6.tar.gz
.
File metadata
- Download URL: thlock-0.9.6.tar.gz
- Upload date:
- Size: 3.9 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 | d8f7c3196d1f692d8f08b35a609fd2cda27b1235a24949feb37dd0ef6fa59f52 |
|
MD5 | b0d1282f04dd47cf9ad85b6983c4aada |
|
BLAKE2b-256 | 97e398a96fe6e7d1868e3cb7b333218114e7148b60cc84274551321c85b10f49 |
File details
Details for the file thlock-0.9.6-py3-none-any.whl
.
File metadata
- Download URL: thlock-0.9.6-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 | ea8db36e7f7ac67befd4d17f13fab42852f6cf557aaa2c820f3c4d507bf675c3 |
|
MD5 | f099182f9bd24b07c938648fe0e9ff6e |
|
BLAKE2b-256 | 10b7d8ddaff386f2937b9f480d72abd3f29b61c6d6d3e31ec261c749f2ad81ef |