Skip to main content

TangledHub thlock library

Project description

Build Status Stable Version Coverage Python License

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)

Uploaded Source

Built Distribution

thlock-0.9.5-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

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

Hashes for thlock-0.9.5.tar.gz
Algorithm Hash digest
SHA256 aa9890410570476279b0b79ae977b8021fa6b9dc551d37b1fdac0de2bfda4a24
MD5 5031c14773ab361d84a6a38ac8277b10
BLAKE2b-256 1df89d64f73a4e7e265c02935bd66adcb73ed72fd118c03fcef25876fbcaa275

See more details on using hashes here.

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

Hashes for thlock-0.9.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f115c916fe921a70dbb5d1ff89f4ad2a4e4cab34666a43776a9efc31b72842a7
MD5 fa0abf99a8b7d50d370fd562e725a85c
BLAKE2b-256 0b805f0043bba588a381b59870266e4d468cb11339d7861450d5b083eb955718

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page