Skip to main content

A utility module to track and limit the number of running application instances by checking processes and lock files.

Project description

Instance Checker

A simple and powerful Python utility to count running instances of an application.

Usage Example

from instance_checker.utils import CountHelper

helper = CountHelper(lock_dir="/tmp/my_app_locks")

print(helper.process_count("my_app"))        #> 2
print(helper.pid_file_count("my_app"))       #> 1

Installation

pip install instance-checker

License

MIT License — feel free to use it in any project! 🎉

Documentation

https://instance-checker.dkurchigin.ru/

Author

Made with ❤️ by @dkurchigin

Gitverse

https://gitverse.ru/dkurchigin/instance-checker

Project details


Download files

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

Source Distribution

instance_checker-0.4.3.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

instance_checker-0.4.3-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file instance_checker-0.4.3.tar.gz.

File metadata

  • Download URL: instance_checker-0.4.3.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.25.9 CPython/3.13.7 Linux/5.15.0-144-generic

File hashes

Hashes for instance_checker-0.4.3.tar.gz
Algorithm Hash digest
SHA256 335574aff1bd98c03abd0552508b448c4ff549aaf8dda5ea31c90de0a49c3f7f
MD5 2e3b39e5ac9b0afa622a7d314c09dac9
BLAKE2b-256 247df83ad439f148665a3d51110a8c77245849820f32c7b030e5e78f43038d2a

See more details on using hashes here.

File details

Details for the file instance_checker-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: instance_checker-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.25.9 CPython/3.13.7 Linux/5.15.0-144-generic

File hashes

Hashes for instance_checker-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 58c5c4c5cce39d8b79f4ec6c675d16e3f8d57e3e8f1ffe008a2101b1cc4b7332
MD5 8bf28486d0930779aa5f9c85d904d06b
BLAKE2b-256 3afe76cd2f6012a46c5e7529557297674f38b95642ff4d6fd94912c3ae0fd4a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page