Skip to main content

simple and useful status manager for bulk computations

Project description

status-manager python library

simple and useful status manager for bulk computations

Assume that you have multiple folders which each one have a complete and isolated computation task. When you need to run them in sequence, may be it waste your time to count the current stage of each one. With this library you can easily handle the progress of each computation inside their own folders.

Usage

For example assume there are 4 folders inside the working directory, each one has a computation of calculating solar energy of a planet. Now you are going to start computation for them which are not finished from previous attempts. I mean something like this:

for i in range(1, 5):
        task = f"task-{i}"
        os.system(f"{task}/run_calculations") # run calculations

By using status-manager, it will be very easy! See this example:

Example

from status_manager import CheckStatus, StatusType

s = CheckStatus() # init the status manager

for i in range(1, 5):
        task = f"task-{i}"
        status = s.check(task) # read status of this task
        if status != StatusType.finished:
            os.system(f"{task}/run_calculations") # run calculations
            status.write_status(task, StatusType.finished) # save as finished

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

status_manager-1.0.1.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

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

status_manager-1.0.1-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file status_manager-1.0.1.tar.gz.

File metadata

  • Download URL: status_manager-1.0.1.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for status_manager-1.0.1.tar.gz
Algorithm Hash digest
SHA256 537975f46fb422dd3bc784f9777b0aab0f759810ef92c84c5ff3c63e87f35734
MD5 c80798ccae39e0bf5a4af60b13d5f108
BLAKE2b-256 b31d24b800a02b1537c48c86b4a7b846da5d80270db41a5d4efaa35a9f475940

See more details on using hashes here.

File details

Details for the file status_manager-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: status_manager-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for status_manager-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ddd368d7025487677c1d078175823080bd7bc7ba3606d02f858221d61fbdf64
MD5 43195e083f168f04fc177f668238eb31
BLAKE2b-256 472a73386401c5e33fd21e35eb97cd9f4284fbca30cc7992bea58572803dd6dd

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