معرفی شرکت ها


dimutex-1.3.1


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Mutex implementation for distributed systems.
ویژگی مقدار
سیستم عامل -
نام فایل dimutex-1.3.1
نام dimutex
نسخه کتابخانه 1.3.1
نگهدارنده []
ایمیل نگهدارنده []
نویسنده -
ایمیل نویسنده Gram <gram@orsinium.dev>
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/dimutex/
مجوز -
# dimutex Python library implementing [asyncio][asyncio]-based distributed mutex on top of different providers. [Mutex][mutex] is a synchronization primitive used to ensure that only one worker can do the given job. It can be used for safe access to a shared resource or for distributing tasks among multiple workers. Currently, the only implemented provider is GCS (Google Cloud Storage). The implementation is based on the algorithm described in article [A robust distributed locking algorithm based on Google Cloud Storage][gcs-algo] (see also [Ruby implementation][ruby]). [asyncio]: https://docs.python.org/3/library/asyncio.html [mutex]: https://stackoverflow.com/questions/34524/what-is-a-mutex [gcs-algo]: https://www.joyfulbikeshedding.com/blog/2021-05-19-robust-distributed-locking-algorithm-based-on-google-cloud-storage.html [ruby]: https://github.com/FooBarWidget/distributed-lock-google-cloud-storage-ruby ## Features + Asynchronous. + Type-safe. + Atomic. + Expiration mechanism to ensure that a single worker won't hold the lock forever. + Supports emulators. ## Installation ```bash python3 -m pip install dimutex ``` ## Usage ```python import dimutex async def do_something(): lock = dimutex.GCS(bucket='bucket-name', name='lock-name') async with lock: try: await lock.acquire() except dimutex.AlreadyAcquiredError: return 'already acquired' try: ... # do something with the shared resuource finally: await lock.release() ```


نیازمندی

مقدار نام
- aiohttp
- gcloud-aio-auth
- bandit
- flake8
- isort
- mypy
- unify
- pytest>=6.2.0
- pytest-asyncio
- pytest-cov


زبان مورد نیاز

مقدار نام
>=3.6 Python


نحوه نصب


نصب پکیج whl dimutex-1.3.1:

    pip install dimutex-1.3.1.whl


نصب پکیج tar.gz dimutex-1.3.1:

    pip install dimutex-1.3.1.tar.gz