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.1.tar.gz
(3.7 kB
view details)
Built Distribution
File details
Details for the file thlock-0.9.1.tar.gz
.
File metadata
- Download URL: thlock-0.9.1.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 | c4bec0856d348cdb2604fe90045142adaabc6ebf54ba61f6d861bbfdd934baff |
|
MD5 | 327219054b487dbd3547d3ea8dcbc927 |
|
BLAKE2b-256 | 77ea238b7609f5a8e5beaa1f4c0acb9e9578adae77034c4e1b3e92ed1801dbd4 |
File details
Details for the file thlock-0.9.1-py3-none-any.whl
.
File metadata
- Download URL: thlock-0.9.1-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 | 475ad67bbaa23681a411c09134f63a6aca02b4645a1cfc506874272619f3a830 |
|
MD5 | d2ee20af3d1c319a89b77ec23eb8e02c |
|
BLAKE2b-256 | 505cfd6fae76cf6f02c97fdf80ad849e3e0d550511ad12dcded91cfabc50cd9a |