{"id":23047,"library":"bash","title":"bash","description":"Bash for Python is a library that allows you to run bash commands as Python function calls. Current version 0.6, last updated in 2013, no recent releases (abandoned).","status":"abandoned","version":"0.6","language":"python","source_language":"en","source_url":"https://github.com/alexcouper/bash","tags":["bash","shell","command","unmaintained"],"install":[{"cmd":"pip install bash==0.6","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"bash","correct":"import bash"}],"quickstart":{"code":"import bash\nresult = bash.ls('-l')\nprint(result)","lang":"python","description":"Run bash commands by calling them as functions. Use keyword arguments for flags."},"warnings":[{"fix":"Use shell escaping or prefer subprocess for dynamic commands.","message":"Arguments are joined with spaces; do not pass untrusted input without quoting. e.g., bash.cat('file.txt') is safe, but bash.grep(f'-e {user_input}') may allow injection.","severity":"gotcha","affected_versions":"all"},{"fix":"import bash; bash.settings.bash='/usr/bin/bash'","message":"Set interpreter path via bash.settings.bash='/bin/bash' on systems where bash is elsewhere (e.g., NixOS). Defaults to /bin/bash.","severity":"gotcha","affected_versions":"all"},{"fix":"Consider alternatives: sh, plumbum, subprocess.","message":"Library is unmaintained since 2013, no Python 3 compatibility fixes. May not work with newer Python versions.","severity":"deprecated","affected_versions":">0.6"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install bash==0.6","cause":"Library not installed or Python 3 incompatible if installed incorrectly.","error":"ImportError: No module named bash"},{"fix":"Check that the command exists and is in PATH before calling.","cause":"Command not found in PATH returns None; trying to call it as a function raises error.","error":"TypeError: 'NoneType' object is not callable"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}