Skip to main content

My utility library with zero dependency

Project description

Kas-Utils

My utility library with zero dependency

Functions

add_json
  • Append new entry in array and write in json file
append
  • Append texts to a file
bgtask
  • Run task in background supressing output by setting stdout and stderr to devnull
cat
  • A poor alternative of GNU/Linux 'cat' command returning file content
center_text
  • Centers texts to terminal
clear
  • Clear the screen and show logo
copy
  • Copies files or folders
delete
  • Delete files/folders if exist
extract
  • Extract zip/tar/tgz files
generate_readme
  • Geneated markdown with function name and docstring
get_docstrings
  • Returns a dictionary of function name as key and docstring as value
get_toml_ver
  • Grab version from toml file
get_ver
  • Converts 1.2.3 to 123 for easy comparison
grep
  • Another poor alternative of GNU/Linux 'grep' command for regex search
inst_module
  • Try to install pip modules
installer
  • Install package by shell command. Specify a package name if it is different than the executable
is_installed
  • Check if a process is running by 'command -v' command. If it has a output exit_code will be 0 and package is already installed
is_json
  • Check if a json is valid
is_online
  • Checks for a valid internet connection
is_running
  • Check if a process is running by 'pidof' command.If pidof has a output exit_code will be 0 and process is running
killer
  • Kill processes by pid
lolcat
  • Prints colorful texts
move
  • Copies files or folders
pretty_print
  • Print decorated file content
readable
  • Bytes to KB, MB converter
rename
  • Copies files or folders
sed
  • Another poor alternative of GNU/Linux 'sed' command to replace and write
send_mail
  • Send mail by smtp library
shell
  • Run shell commands in python
sprint
  • Print lines slowly
write
  • Write texts to a file

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

kasutils-0.0.1.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distribution

kasutils-0.0.1-py3-none-any.whl (9.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page