Skip to main content

Downloads, Installs in paralell - A utility to run multiple shell command sequences (e.g., installations) in parallel with status updates.

Project description

Bolt the Builder Bot - RapidInstall Mascot

rapidinstall

PyPI version

License: GPL v3

A simple Python utility to run multiple shell command sequences (e.g., complex installations, downloads, build steps) in parallel, providing status updates and aggregated output directly to the console.

Features

  • Parallel Execution: Runs multiple tasks concurrently using subprocess.
  • Real-time Output: Captures stdout and stderr from tasks.
  • Status Updates: Periodically shows which tasks are still running and recent output.
  • Clear Formatting: Presents startup, status, and completion information in distinct blocks.
  • Simple API: Easy to integrate into existing Python scripts.
  • Pure Python: Relies only on the standard library.

Installation

pip install rapidinstall

Example: first look

import rapidinstall

my_tasks = [
    {'name': 'Pip', 'commands': 'pip install this that'},
    {'name': 'Download MyFile', 'commands': "wget https://my.file/is_here"}
]

rapidinstall.install(my_tasks)

Downloads and Installs in paralell and updates you on the progress

Example: typical

import rapidinstall

clone_and_install = '''clone https://github.com/tomOfBerlin/rapidinstall
cd rapidinstall
python setup.py install
cd ..'''

my_tasks = [
    {'name': 'Pip', 'commands': 'pip install this that'},
    {'name': 'Download MyFile', 'commands': "wget https://my.file/is_here"},
	{'name': 'Clone and install Dependencies', 'commands': clone_and_install}
]

rapidinstall.install(my_tasks)

You can execute commands sequentially, great for git installs.

Example: silent

# Completely silent - verbose is turned on by default
rapidinstall.install(my_tasks, verbose=False)

# Updates every 60 seconds
rapidinstall.install(my_tasks, update_interval=60)

Example: advanced

# Import directly from the run module (previously executor)
from rapidinstall.run import run_tasks
# You can also access constants like:
# from rapidinstall.run import DEFAULT_STATUS_UPDATE_INTERVAL

task_a = {'name': 'Task A', 'commands': 'echo "Executing A"; sleep 1'}
task_b = {'name': 'Task B', 'commands': 'echo "Executing B"; sleep 1'}

print("\n--- Starting Advanced Example (run_tasks) ---")
# Pass arguments directly to run_tasks
results_advanced = run_tasks(todos=[task_a, task_b], verbose=True, update_interval=10)
print("--- Advanced Example Finished ---")

print("\n--- Task Execution Summary (Advanced) ---")
print(results_advanced) # Print the raw results dictionary

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

rapidinstall-0.9.2.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

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

rapidinstall-0.9.2-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

Details for the file rapidinstall-0.9.2.tar.gz.

File metadata

  • Download URL: rapidinstall-0.9.2.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.15

File hashes

Hashes for rapidinstall-0.9.2.tar.gz
Algorithm Hash digest
SHA256 f608cf67a2c99364c69c26c8c00d2762ffc729c88e97f57680d867a2b60c8205
MD5 c08ee9f20c9b1d65f4811864dbf0c38c
BLAKE2b-256 26ab092a489df8980c86bf0bae85c2ad0bbc07699b9af2bba8e905132eab1f69

See more details on using hashes here.

File details

Details for the file rapidinstall-0.9.2-py3-none-any.whl.

File metadata

  • Download URL: rapidinstall-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 21.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.15

File hashes

Hashes for rapidinstall-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fadec8b859a7f86005b135a2a60bb8160a4abd9338ecacae3766b5f30cc75bfa
MD5 36c6b67458bab8441246db6ab29ee082
BLAKE2b-256 859abb74da162295b8d0a9639266b4e0859df8a8b2de43fdef110f04e9cdb5b1

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