A package which allows making bash style command line scripts easier.
Project description
Python Bash Utils
Author: Tim Santor tsantor@xstudios.agency
Overview
Bash color management and log system for Python users.
Requirements
Python 2.7.x, 3.6.x
Installation
You can install directly via pip:
pip install python-bash-utils
Usage
logmsg
Import:
from bashutils import logmsg
Functions:
logmsg.divline() # ---------- logmsg.header('header') # ==> header logmsg.success('success') # [+] success logmsg.error('error') # [-] error logmsg.warning('warning') # [!] warning logmsg.info('info') # [i] info logmsg.note('note') # note logmsg.prompt('What is your name?) # [?] What is your name? lomgsg.confirm('Confirm this') # [?] Confirm this? (y/n)
bashutils
Import:
from bashutils import bashutils
Functions:
bashutils.get_os() # OSX, 'Fedora', 'CentOS', 'Debian', 'Ubuntu' status, stdout, stderr = bashutils.exec_cmd('git -h') bashutils.cmd_exists('git') # True or False
Version History
0.1.0 - Initial release
0.1.1 - Added some new methods
0.1.2 - Refactor
0.1.3 - Added Python 3.4.x support
0.1.4 - Added ability to pass logger instance to log message as well
0.1.5 - Added Windows output workaround
0.1.6 - Removed needless declined method, was being overly verbose in output
0.2.0 - Updated for Python 3
0.3.0 - Simplified code base and now rely on colorama for cross-platform terminal color support
0.3.1 - Added cooler icons for success/error for Linux/Mac
Issues
If you experience any issues, please create an issue on Bitbucket.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for python_bash_utils-0.3.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3da8a4fb7bd702d311bdcb8faf397893c45b7a37f15e1842393325432d700b9 |
|
MD5 | 092a5f7ee772c424a8deeb79b14ac0f7 |
|
BLAKE2b-256 | bb89ebfcfc8a52b289c7ce8bd47c53bc79f1c9fb86bbde74b7a147d218031c03 |