This is kind of a wrapper around that allows us to run bash commands easily from Python.
No more YML files or configurations.
Simple Python functions for common tasks.
Install the repository using pip
pip install https://github.com/Mittal-Analytics/system-setup/archive/main.zip
Start using the functions
from system_setup import utils as setup
# create directory
setup.bash('mkdir -p /home/ubuntu/project')
# initialize git directory
setup.bash('git init /home/ubuntu/repos')
# run sudo commands
setup.bash('sudo mkdir -p /app')
# replace line in a file
setup.replace_line('/etc/hosts/', '#127.0.0.1 foobar.com', '127.0.0.1 foobar.com')
These are few common recipes already included.
[todo]
Please create a pull-request to contribute more common utils.
Update the version in setup.py
. The create the release.
python setup.py sdist