Skip to main content

natspy-lock

PyPI - Version PyPI - Python Version


natspy-lock is a distributed lock library using nats.

Table of Contents

Installation

pip install natspy-lock

Example

import nats
from natspy_lock import NatsLock

async def main():
    nc = await nats.connect("nats://127.0.0.1:4222")
    await NatsLock.init(nc.jetstream(), "test_lock", 60)
    async with NatsLock.get_lock("test_lock", 1):
    #     do something
        pass
    await nc.drain()

License

natspy-lock is distributed under the terms of the MIT license.

Metadata

Release files for natspy-lock 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for natspy-lock 0.2.0
File Size Uploaded Provenance Actions
natspy_lock-0.2.0.tar.gz 6.7 kB Without provenance Details for natspy_lock-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for natspy-lock 0.2.0
File Interpreter ABI Platform Actions
natspy_lock-0.2.0-py3-none-any.whl Python 3 none any Details for natspy_lock-0.2.0-py3-none-any.whl

Total release size: 10.6 kB

Release files / natspy_lock-0.2.0.tar.gz

Download URL natspy_lock-0.2.0.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b270bee8722865a0bb07fae149cd6b257daefa3bf5f0d69bcf9fb1d1b8343e4d
BLAKE2b-256 checksum
How to use checksums
690b314048ae2bf6fbcec2e3c857ea4b01322d393501a2dac1524207a4b0a14d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.25.0

Release files / natspy_lock-0.2.0-py3-none-any.whl

Download URL natspy_lock-0.2.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ae065595e4a6945990fca6454e00ac6a73370aa51629c8313f21a65114b6bbf
BLAKE2b-256 checksum
How to use checksums
785c7b67289e6da228cd0ae7d8547365f3e92168047a900a1c912e95ac5387c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.25.0

Security for natspy-lock 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page