Skip to main content

portlock

A simple library you can use to ensure that only one copy of your script is running at once

Works on *NIX systems, not sure about Windows.

from portlock import ensure_singleton

def main():
    ensure_singleton(6000)
    # If you reach here, you can ensure that no other proccess
    # is running on port 6000
    ...

Metadata

Release files for portlock 0.0.5

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

Source distribution (sdist)

Source distribution for portlock 0.0.5
File Size Uploaded Provenance Actions
portlock-0.0.5.tar.gz 2.2 kB Without provenance Details for portlock-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for portlock 0.0.5
File Interpreter ABI Platform Actions
portlock-0.0.5-py3-none-any.whl Python 3 none any Details for portlock-0.0.5-py3-none-any.whl

Total release size: 5.4 kB

Release files / portlock-0.0.5.tar.gz

Download URL portlock-0.0.5.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
730b33fc8b969fd1257b6762938e36e277e2558651cfb046671cb133afd7f8b1
BLAKE2b-256 checksum
How to use checksums
f668d1532c7cb898a7095b1359d94888b27d826190e93bf96928212f29c099ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release files / portlock-0.0.5-py3-none-any.whl

Download URL portlock-0.0.5-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5da2733df2b505084d8f6e89a8a16a4b10dfb5302e55a865b40f6a89cb72bab9
BLAKE2b-256 checksum
How to use checksums
8e5f86a806649d95fdc00948888414191ea209f71a4c6c146bf214dc1bcb6a28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Security for portlock 0.0.5

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