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.0.tar.gz (15.0 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.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file status-manager-1.0.0.tar.gz.

File metadata

  • Download URL: status-manager-1.0.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.8

File hashes

Hashes for status-manager-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9f406a6e7a8169fd6225223b8abcb934b7249be1371c307c531c1cbd95387c1c
MD5 ee02c8cd10e4566ecd0ee9a21c103cee
BLAKE2b-256 4f112711cb7c6df5efb74f08febed1b217102c07b48aa6a8110b9999eb697595

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for status_manager-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28c858112982a925cb0dc38ec9a8743850bce080e549e8e29c22f3218083b564
MD5 72e09e0c4166af2707411df7f16f84c8
BLAKE2b-256 2487393f0922114ff9e9f4971d6f8e052523ed19b8bfc3924bb27551aceabbd1

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