{"id":18640028,"url":"https://github.com/ryankwilliams/blaster","last_synced_at":"2025-04-11T10:32:58.783Z","repository":{"id":23444624,"uuid":"98916522","full_name":"ryankwilliams/blaster","owner":"ryankwilliams","description":"Blast off a list of tasks concurrently calling each tasks methods defined","archived":false,"fork":false,"pushed_at":"2023-01-16T11:21:15.000Z","size":101,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-10T11:28:29.419Z","etag":null,"topics":["blaster","concurrent-programming","python","python-library","python-package"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryankwilliams.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-31T18:16:51.000Z","updated_at":"2023-01-17T07:34:46.000Z","dependencies_parsed_at":"2023-02-10T03:01:10.942Z","dependency_job_id":null,"html_url":"https://github.com/ryankwilliams/blaster","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryankwilliams%2Fblaster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryankwilliams%2Fblaster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryankwilliams%2Fblaster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryankwilliams%2Fblaster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryankwilliams","download_url":"https://codeload.github.com/ryankwilliams/blaster/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223466449,"owners_count":17149770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blaster","concurrent-programming","python","python-library","python-package"],"created_at":"2024-11-07T05:52:50.806Z","updated_at":"2024-11-07T05:52:51.348Z","avatar_url":"https://github.com/ryankwilliams.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blaster\n\n[![PR-Verification](https://github.com/ryankwilliams/blaster/actions/workflows/pr_verification.yml/badge.svg)](https://github.com/ryankwilliams/blaster/actions/workflows/pr_verification.yml)\n[![PyPI version](https://img.shields.io/pypi/v/blaster.svg)](https://pypi.python.org/pypi/blaster)\n\nBlaster is a library that provides the ability to blast off a list of tasks\nand call each of their given methods concurrently. Blaster uses Python's\nbuilt-in multiprocessing library to run the list of tasks.\n\n## Installation\n\nBlaster can be easily installed with a one line command. It is available on\n[pypi][1]. It is recommended (as best practice) to create a virtual\nenvironment and install blaster. Please see the commands below to install\nblaster.\n\n```\n# Create a python virtual environment\npython3 -m venv venv\n\n# Activate the virtual environment\nsource venv/bin/activate\n\n# Install blaster\n(venv) pip install blaster\n```\n\n## Examples\n\nAt the root of blaster project, you will see a examples folder. Within this\nfolder you will find simple examples on how you can use blaster to\nefficiently run many tasks.\n\n## Output\n\nWhen blaster calls its blastoff method, on completion. It will return back\nto you a list of task results. Within each task dictionary it will have the\noriginal task data passed in along with a couple new keys. A status key which\nis an integer (0 or 1) to determine pass or fail. If a task failed, it would\nhave a traceback key with the exception raised for helpful troubleshooting.\n\n## Terminology\n\n### Task\n\nA task is a python dictionary that defines the task to be blasted off. A task\nmust contain three keys **name**, **task** and **methods**. The name key\njust tells blaster what the task name is. The task key is a Python class\nreference. Finally the methods key is a list of methods to be run for the\ngiven task. You can then define any other key:value pairs that will be passed\nto the task given when an object is created for that class.\n\nBelow is an example task for building a contemporary house. You will see\nthe task key has a value of the House class which contains all the methods\ndefined. Blaster will create a house object (passing any extra data in this\ncase **style**) and then call the methods defined.\n\n```python\n[\n    {\n        'name': 'House #1',\n        'task': House,\n        'methods': [\n            'foundation',\n            'frame',\n            'roof',\n            'furnish',\n            'enjoy'\n        ],\n        'style': 'contemporary'\n    }\n]\n```\n\nYou also have the ability to set a timeout for each task. If the timeout is\nreached, the task will be exited.\n\n```python\n[\n    {\n        'name': 'House #1',\n        'task': House,\n        'methods': [\n            'foundation',\n            'frame',\n            'roof',\n            'furnish',\n            'enjoy'\n        ],\n        'style': 'contemporary',\n        'timeout': 10\n    }\n]\n```\n\nThe nice feature with blaster is you can have multiple tasks but each one\ncan call various methods within that task class. They do not all need to call\nthe same methods! See the example below:\n\n```python\n[\n    {\n        'name': 'House #1',\n        'task': House,\n        'methods': [\n            'foundation',\n            'frame',\n            'roof',\n            'furnish',\n            'enjoy'\n        ],\n        'style': 'contemporary'\n    },\n    {\n        'name': 'House #2',\n        'task': House,\n        'methods': [\n            'foundation',\n            'frame',\n            'roof'\n        ],\n        'style': 'cape'\n    }\n]\n```\n\n## Issues\n\nFor any issues that you may find while using blaster library. Please open a\nnew issue or you can open pull request.\n\n[1]: https://pypi.python.org/pypi/blaster\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryankwilliams%2Fblaster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryankwilliams%2Fblaster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryankwilliams%2Fblaster/lists"}