Skip to main content

A standard kaviyes utility for python thats ideal for small projects and prototypes.

Project description

Python Windows Linux MacOS

Open Issues Closed Issues License VsCode

A standard kaviyes utility for python thats ideal for small projects and prototypes.

Installation

You can install and update using pip

pip install kaviyesutil -U

Documentation

FUNCTIONS


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

EXAMPLES

printc

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

countdown(10,'Timer: ' ,'Timer complete!')

cloakedLink

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

resourcePath("image.png") # For PyInstaller

generateCustomID

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"

prompt

#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!')

currentTime

#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

delay(1) # delays for 1 second

sleep(.25) # delays for 250 miliseconds

decodeHex

x = 68656c6c6f20746865726521
decodeHex(x, reversed = True)

decodeHex(x, reversed = False)

encodeHex

x = "hello there!"
encodeHex(x, reversed = True)

encodeHex(x, reversed = False)

terminal

terminal('echo Hello Kaviyes!') #Outputs Hello Kaviyes! to terminal

cter

cter() # will clear the terminal

Notes

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:

  • Renamed FancyText to printc.
  • Removed ConvertUnits and Today functions.
  • Improved function names.
  • General bug fixes and improvements.

Compatibilities:

Python version: 3.10 minimum

IDE:

  • Visual Studio Code (fully compatible)
  • PyCharm (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 or later)

Links:





KAVIYES


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

kaviyesutil-2.0.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

kaviyesutil-2.0.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file kaviyesutil-2.0.0.tar.gz.

File metadata

  • Download URL: kaviyesutil-2.0.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for kaviyesutil-2.0.0.tar.gz
Algorithm Hash digest
SHA256 884759e50df0f9c5c810081c8d5290a9a37f9126ab2f8d5c41df6b87dbc51ca0
MD5 9424b3c0a26dcafe253af73fdf1e4b62
BLAKE2b-256 5245ccb35c095f49e71b169425837928e776325bb55ff9c2bc7896d794d119b3

See more details on using hashes here.

File details

Details for the file kaviyesutil-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: kaviyesutil-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for kaviyesutil-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 251a5ca8112ec4ca9930de0299ab4c5be1d8b96b8f1f264800b59c659b61b896
MD5 d873bed3debe9d0616ead8b837b2fbeb
BLAKE2b-256 1cbec895592800daee256e1d2bfbd20ca88f1700c84fa562fab33f3a63f1cf20

See more details on using hashes here.

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