Skip to main content

A package to lock ports

Project description

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
    ...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for portlock, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size portlock-0.0.5-py3-none-any.whl (3.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size portlock-0.0.5.tar.gz (2.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page