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.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

thlock-0.9.2-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file thlock-0.9.2.tar.gz.

File metadata

  • Download URL: thlock-0.9.2.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

Hashes for thlock-0.9.2.tar.gz
Algorithm Hash digest
SHA256 e6f46a538d052bb35c96f644aed1103756914a40ec26c58e5c55a2a61d80b5bf
MD5 63a266ed8ea824fd61b3c69c54958ad1
BLAKE2b-256 d16c37d943b06f2ef8f38b5d524ea2f5a7d04d62a7ad4eec0dd0fa6cd67ada80

See more details on using hashes here.

File details

Details for the file thlock-0.9.2-py3-none-any.whl.

File metadata

  • Download URL: thlock-0.9.2-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

Hashes for thlock-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9dbb728dc9756b7feaa637745b6febdab6882599859259c9923a5aa9ab6647da
MD5 70d2f83680f376c58c1c311990273fb9
BLAKE2b-256 92d221f6419d31472846b9a1b725081291460462f3367b529c42f2d95aeebe98

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