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.6.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

thlock-0.9.6-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

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