[![Build][build-image]]()
[![Status][status-image]][pypi-project-url]
[![Stable Version][stable-ver-image]][pypi-project-url]
[![Coverage][coverage-image]]()
[![Python][python-ver-image]][pypi-project-url]
[![License][bsd3-image]][bsd3-url]
# thlock
## Overview
TangledHub library for etcd_lock with a focus on asynchronous functions
## Licencing
thlock is licensed under the BSD license. Check the [LICENSE](https://opensource.org/licenses/BSD-3-Clause) for details
---
## Installation
```bash
pip install thlock
```
## Testing
```bash
docker-compose build thlock-test ; docker-compose run --rm thlock-test
```
## Building
```bash
docker-compose build thlock-build ; docker-compose run --rm thlock-build
```
## Publish
```bash
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
```python
HOST = 'etcd-test'
PORT = 2379
# create instance of EtcdLock
lock = EtcdLock(host=HOST, port=PORT, name='lock-0')
```
### Acquire lock
```python
HOST = 'etcd-test'
PORT = 2379
# create instance of EtcdLock
lock = EtcdLock(host=HOST, port=PORT, name='lock-0')
# acquire lock
await lock.acquire()
```
<!-- Links -->
<!-- Badges -->
[bsd3-image]: https://img.shields.io/badge/License-BSD_3--Clause-blue.svg
[bsd3-url]: https://opensource.org/licenses/BSD-3-Clause
[build-image]: https://img.shields.io/badge/build-success-brightgreen
[coverage-image]: https://img.shields.io/badge/Coverage-100%25-green
[pypi-project-url]: https://pypi.org/project/thlock/
[stable-ver-image]: https://img.shields.io/pypi/v/thlock?label=stable
[python-ver-image]: https://img.shields.io/pypi/pyversions/thlock.svg?logo=python&logoColor=FBE072
[status-image]: https://img.shields.io/pypi/status/thlock.svg
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/tangledlabs/thlock",
"name": "thlock",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10,<4.0",
"maintainer_email": "",
"keywords": "tangled,tangledlabs,tangledhub,thlock",
"author": "TangledHub",
"author_email": "info@tangledgroup.com",
"download_url": "https://files.pythonhosted.org/packages/97/e3/98a96fe6e7d1868e3cb7b333218114e7148b60cc84274551321c85b10f49/thlock-0.9.6.tar.gz",
"platform": null,
"description": "[![Build][build-image]]()\n[![Status][status-image]][pypi-project-url]\n[![Stable Version][stable-ver-image]][pypi-project-url]\n[![Coverage][coverage-image]]()\n[![Python][python-ver-image]][pypi-project-url]\n[![License][bsd3-image]][bsd3-url]\n\n\n# thlock\n\n## Overview\nTangledHub library for etcd_lock with a focus on asynchronous functions\n\n## Licencing\nthlock is licensed under the BSD license. Check the [LICENSE](https://opensource.org/licenses/BSD-3-Clause) for details\n\n---\n\n## Installation\n```bash\npip install thlock\n```\n\n## Testing\n```bash\ndocker-compose build thlock-test ; docker-compose run --rm thlock-test\n```\n\n## Building\n```bash\ndocker-compose build thlock-build ; docker-compose run --rm thlock-build\n```\n\n## Publish\n```bash\ndocker-compose build thcrypto-lock ; docker-compose run --rm -e PYPI_USERNAME=__token__ -e PYPI_PASSWORD=__SECRET__ thlock-publish\n```\n\n---\n\n## Usage\n\n### setup\n\nCreate instance of EtcdLock\n\n```python\n\nHOST = 'etcd-test'\nPORT = 2379\n\n# create instance of EtcdLock\nlock = EtcdLock(host=HOST, port=PORT, name='lock-0')\n\n```\n\n\n### Acquire lock\n\n```python\n\nHOST = 'etcd-test'\nPORT = 2379\n\n# create instance of EtcdLock\nlock = EtcdLock(host=HOST, port=PORT, name='lock-0')\n\n# acquire lock\nawait lock.acquire()\n\n```\n\n\n<!-- Links -->\n\n<!-- Badges -->\n[bsd3-image]: https://img.shields.io/badge/License-BSD_3--Clause-blue.svg\n[bsd3-url]: https://opensource.org/licenses/BSD-3-Clause\n[build-image]: https://img.shields.io/badge/build-success-brightgreen\n[coverage-image]: https://img.shields.io/badge/Coverage-100%25-green\n\n[pypi-project-url]: https://pypi.org/project/thlock/\n[stable-ver-image]: https://img.shields.io/pypi/v/thlock?label=stable\n[python-ver-image]: https://img.shields.io/pypi/pyversions/thlock.svg?logo=python&logoColor=FBE072\n[status-image]: https://img.shields.io/pypi/status/thlock.svg\n\n\n",
"bugtrack_url": null,
"license": "BSD 3-clause",
"summary": "TangledHub thlock library",
"version": "0.9.6",
"split_keywords": [
"tangled",
"tangledlabs",
"tangledhub",
"thlock"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "f099182f9bd24b07c938648fe0e9ff6e",
"sha256": "ea8db36e7f7ac67befd4d17f13fab42852f6cf557aaa2c820f3c4d507bf675c3"
},
"downloads": -1,
"filename": "thlock-0.9.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f099182f9bd24b07c938648fe0e9ff6e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10,<4.0",
"size": 4699,
"upload_time": "2022-12-19T14:17:26",
"upload_time_iso_8601": "2022-12-19T14:17:26.303404Z",
"url": "https://files.pythonhosted.org/packages/10/b7/d8ddaff386f2937b9f480d72abd3f29b61c6d6d3e31ec261c749f2ad81ef/thlock-0.9.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "b0d1282f04dd47cf9ad85b6983c4aada",
"sha256": "d8f7c3196d1f692d8f08b35a609fd2cda27b1235a24949feb37dd0ef6fa59f52"
},
"downloads": -1,
"filename": "thlock-0.9.6.tar.gz",
"has_sig": false,
"md5_digest": "b0d1282f04dd47cf9ad85b6983c4aada",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10,<4.0",
"size": 3874,
"upload_time": "2022-12-19T14:17:27",
"upload_time_iso_8601": "2022-12-19T14:17:27.764491Z",
"url": "https://files.pythonhosted.org/packages/97/e3/98a96fe6e7d1868e3cb7b333218114e7148b60cc84274551321c85b10f49/thlock-0.9.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-19 14:17:27",
"github": false,
"gitlab": true,
"bitbucket": false,
"gitlab_user": "tangledlabs",
"gitlab_project": "thlock",
"lcname": "thlock"
}