Skip to main content

simple and useful status manager for bulk computations

Project description

status-manager python library

Upload Python Package

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: status_manager-1.0.2.tar.gz
  • Upload date:
  • Size: 14.7 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.2.tar.gz
Algorithm Hash digest
SHA256 af274d0b848e908ae8ec117da1c5c9ab8c61c7f33c24dcee36b9e22279b7e089
MD5 5f0195a37e6677d2c8b2e65fe418f45b
BLAKE2b-256 63a9da08f34e9d0cde0f8991da10f7b2b94f45d28b94240afc9908d59613097c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: status_manager-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 15.0 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4edda19e5438ec198f55226e5a3f5656b99bfd98111ec6dda56ca9bc27e4e4ee
MD5 86b4f0fe7145d4cbbb6782eb87411bf6
BLAKE2b-256 39a294943cdf834cca5a5eb6f1e8f55fbd30047e06e70ac5cbfd0c557d202d1d

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