Skip to main content

Create proofs of life to detect when a program fails.

Project description

lifeproof

Create proofs of life to detect when a program fails.

Create a file proof of life

To create a file proof of life is very simple. You only need to execute:

from lifeproof import FileProofOfLife

with FileProofOfLife('file_path'):
       something_to_do()

Where 'file_path' is the file path to the proof of life to check. If this file is removed, then the program has died for any cause. The something_to_do() represent the commands to check if they are still alive. If something_to_do() breaks down for some reason, the file automatically will be removed.

For example:

from lifeproof import FileProofOfLife
from time import sleep

with FileProofOfLife('health.txt'):
       sleep(60)

This script will create the file 'health.txt' during 60 seconds. At the end of sleep(60) the 'health.txt' file will be removed.

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

lifeproof-0.0.1.tar.gz (14.9 kB view details)

Uploaded Source

File details

Details for the file lifeproof-0.0.1.tar.gz.

File metadata

  • Download URL: lifeproof-0.0.1.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.3

File hashes

Hashes for lifeproof-0.0.1.tar.gz
Algorithm Hash digest
SHA256 74f6349e958f0ddfc6657079d339f2f900e110eb0e18a8b31efb224183e784bf
MD5 d99831ab94a701c7f29ee42b935af426
BLAKE2b-256 4141d11c5265f2e044df47b40e3634f0c7c93c3b7f7ec4f5bf6a936e26849d8d

See more details on using hashes here.

Supported by

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