A standard kaviyes utility for python thats ideal for small projects and prototypes.
You can install and update using pip
pip install kaviyesutil -U
FUNCTION | DESCRIPTION |
---|---|
printc |
Quick and easy way to customize your text |
countdown |
A verbose countdown timer |
cloakedLink |
create a visually appealing links for terminals |
resourcePath |
Get absolute path to resource, works for dev and for PyInstaller |
generateCustomID |
Generate own custom ID or use premade formats |
prompt |
Prompts user with desired message |
currentTime |
A simplified version of datetime function |
delay |
a delay function / This function is from time.sleep() |
decodeHex |
Decodes Hex into String |
encodeHex |
Encodes String into Hex |
terminal |
a quick access to terminal |
cter |
Clears the contents of the terminal screen |
printc('Hello Kaviyes!', 'red', 'magenta')
print(printc('Hello Kaviyes!', 'red', 'magenta', True))
printc('Hello Kaviyes!', 'red', 'magenta', 'bold', 'italic')
print(printc('Hello Kaviyes!', 'red', 'magenta', 'bold', 'italic', ReturnText='True'))
countdown(10,'Timer: ' ,'Timer complete!')
cloakedLink('visit kaviyes on github!', 'https://github.com/Kaviyes', True)
print(cloakedLink('visit kaviyes on github!', 'https://github.com/Kaviyes'))
cloakedLink(printc('Visit Kaviyes on Github!', 'cyan', 'default', 'underlined', ReturnText=True), 'https://github.com/Kaviyes', Print=True)
resourcePath("image.png") # For PyInstaller
generateCustomID('STD08') # 08 | 16 | 32
generateCustomID(Length="8", Type="standard") # does not include special characters
generateCustomID(Length="8", Type="all") # includes special characters
generateCustomID(Length="8", Type "digits")
generateCustomID('AA00aa$$') # custom one
# A = Uppercase letter A-Z
# a = Lowercase letter a-z
# $ = Custom Characters
# 0 = Digits 0-9
# NOTE: Using "Length" will override "Format"
#default value / Waits until the user press enter
prompt()
#Pause until user press any key
prompt(Anykey=True)
#Add Desired message / Waits until the user press enter
prompt('Hello Kaviyes!')
#Using own format
currentTime('%H:%M:%S')
#Printing the results
time = currentTime('%H:%M:%S')
print(time)
or
print(currentTime('%H:%M:%S'))
#quick preset
currentTime(Format_24H=True) # its true by default
delay(1) # delays for 1 second
sleep(.25) # delays for 250 miliseconds
x = 68656c6c6f20746865726521
decodeHex(x, reversed = True)
decodeHex(x, reversed = False)
x = "hello there!"
encodeHex(x, reversed = True)
encodeHex(x, reversed = False)
terminal('echo Hello Kaviyes!') #Outputs Hello Kaviyes! to terminal
cter() # will clear the terminal
cter("terminal cleared")
Kaviyesutil version 2.0.0 is no longer compatible with older versions.
- This is a completely revamped version, and it is not compatible with older versions due to function changes. It is better to download the old version and use it locally if you want to update to the latest version.
Changes in the new version 2.0.0 - 2.0.1:
2.0.0
- Renamed
FancyText
toprintc
. - Removed
ConvertUnits
andToday
functions. - Improved function names.
- General bug fixes and improvements.
2.0.1
- Fixed print bug on
cloakedLink
function. - Added feature on
cter
to leave message after the terminal is cleared.
Compatibilities:
Python version: 3.10 minimum
IDE:
- Visual Studio Code (fully compatible)
- PyCharm & Visual Studio (function description is displayed in raw but still readable)
- Not tested on other IDEs yet
OS:
- Android (Termux)
- Windows (8.1 and later)
- Linux (Debian and others)
- macOS (10.15 Catalina and later)
Links:
- PyPi
- Found a problem create an issue here!
- Create a pull request here!