100+ Python utility functions and helpers.
pip install python-utilsfrom utils import read_file, write_file, md5_hash
from helpers import run_command, create_dir
# Read file
content = read_file("example.txt")
# Write file
write_file("output.txt", "Hello World")
# Hash text
hash_val = md5_hash("Hello World")
# Run command
code, stdout, stderr = run_command("ls -la")
# Create directory
create_dir("new_folder")read_file(path)- Read file contentwrite_file(path, content)- Write content to filecopy_file(src, dst)- Copy fileremove_file(path)- Remove file
md5_hash(text)- Generate MD5 hashflatten_list(nested)- Flatten nested listchunk_list(lst, size)- Split list into chunksmerge_dicts(*dicts)- Merge dictionaries
run_command(cmd)- Run shell commandcreate_dir(path)- Create directoryget_env(key)- Get environment variabletimestamp()- Get current timestamp
MIT