# status-manager python library
[![Upload Python Package](https://github.com/J-Saeedi/status-manager/actions/workflows/python-publish.yml/badge.svg?branch=main)](https://github.com/J-Saeedi/status-manager/actions/workflows/python-publish.yml)
## 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:
```python
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
```python
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
```
Raw data
{
"_id": null,
"home_page": null,
"name": "status-manager",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "status-manager, status, computation",
"author": "Javad Saeedi",
"author_email": "<j.saeedi.edu@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/9d/8c/955089a5729871313db9a8e4ea0f53300c9eac281d4099fa6932bfdd5ef8/status_manager-1.0.3.tar.gz",
"platform": null,
"description": "\n# status-manager python library\n[![Upload Python Package](https://github.com/J-Saeedi/status-manager/actions/workflows/python-publish.yml/badge.svg?branch=main)](https://github.com/J-Saeedi/status-manager/actions/workflows/python-publish.yml)\n## simple and useful status manager for bulk computations\nAssume that you have multiple folders which each one have a complete and isolated computation task.\nWhen 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. \n\n# Usage\nFor 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:\n```python\nfor i in range(1, 5):\n task = f\"task-{i}\"\n os.system(f\"{task}/run_calculations\") # run calculations\n```\n\nBy using `status-manager`, it will be very easy! See this example:\n\n# Example\n\n```python\nfrom status_manager import CheckStatus, StatusType\n\ns = CheckStatus() # init the status manager\n\nfor i in range(1, 5):\n task = f\"task-{i}\"\n status = s.check(task) # read status of this task\n if status != StatusType.finished:\n os.system(f\"{task}/run_calculations\") # run calculations\n status.write_status(task, StatusType.finished) # save as finished\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "simple and useful status manager for bulk computations",
"version": "1.0.3",
"project_urls": null,
"split_keywords": [
"status-manager",
" status",
" computation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1d80dc122e2e61efbf160aa9a6183afaa388d4d57e1811503e29deb9842a35ae",
"md5": "86cc1c3a30ea1a1e5f9a5aaf01a27c53",
"sha256": "8a6e7eeaa6d1dc7253f7029992d73e81e28343c8f3ff8c29c99b7aa07efcf55a"
},
"downloads": -1,
"filename": "status_manager-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "86cc1c3a30ea1a1e5f9a5aaf01a27c53",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 15013,
"upload_time": "2024-07-10T23:46:52",
"upload_time_iso_8601": "2024-07-10T23:46:52.221502Z",
"url": "https://files.pythonhosted.org/packages/1d/80/dc122e2e61efbf160aa9a6183afaa388d4d57e1811503e29deb9842a35ae/status_manager-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9d8c955089a5729871313db9a8e4ea0f53300c9eac281d4099fa6932bfdd5ef8",
"md5": "b8bb74ce72d537a362632a3381046ff8",
"sha256": "aa57296e021b620be75310439b06e84ca02c1a717546a14b8c32217aa0c4d433"
},
"downloads": -1,
"filename": "status_manager-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "b8bb74ce72d537a362632a3381046ff8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 14727,
"upload_time": "2024-07-10T23:46:53",
"upload_time_iso_8601": "2024-07-10T23:46:53.266754Z",
"url": "https://files.pythonhosted.org/packages/9d/8c/955089a5729871313db9a8e4ea0f53300c9eac281d4099fa6932bfdd5ef8/status_manager-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-10 23:46:53",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "status-manager"
}