Package: helper-for-maxi
Helper for MaxiAll the Functions I could need multiple timesInstructionsInstall:pip install helper-for-maxiImport package:fromhelperimport*ORimporthelperhelper.*# You can replace * with what you need!Currently Implemented Classes / FunctionsappendClipboard()importhelperhelper.appendClipboard(text:str)ORfromhelperimportappendClipboardappendClipboard(text:str)# copies text## Copies / Appends the given text to the windows clipboard using the utf-8 encoding## Parameters# ----------# text: str#     The text that is copied / appended to the clipboardbetterColorInput()importhelperhelper.betterColorInput(text:str,beforeColor:Optional[Terminal.color.foreground]=Terminal.color.RESET,delay:float=.01)ORfromhelperimportbetterColorInputbetterColorInput(text:str,beforeColor:Optional[Terminal.color.foreground]=Terminal.color.RESET,delay:float=.01)# Gets an input## Prints the given text letter by letter using the specified delay and gets an input() in cyan after## Parameters# ----------# text: Optional[str]#     The text that is printed letter by letter#     DEFAULT: None## beforeColor: Optional[Terminal.color.foreground]#     The color to change back to after getting the input#     DEFAULT: None## delay: Optional[float]#     Changes the time between each printed letter#     DEFAULT: .01betterInput()importhelperhelper.betterInput(text:str="",delay:float=.01)ORfromhelperimportbetterInputbetterInput(text:str="",delay:float=.01)# Gets an input## Prints the given text letter by letter using the specified delay and gets an input() after## Parameters# ----------# text: Optional[str]#     The text that is printed letter by letter#     DEFAULT: ""## delay: Optional[float]#     Changes the time between each printed letter#     DEFAULT: .01betterPrint()importhelperhelper.betterPrint(text:str,delay:float=.01)ORfromhelperimportbetterPrintbetterPrint(text:str,delay:float=.01)# Prints text## Prints the given text letter by letter to the command line using the specified delay## Parameters# ----------# text: str#     The text that is printed letter by letter## delay: Optional[float]#     Changes the time between each printed letter#     DEFAULT: .01## newLine: Optional[bool]#     whether to add a new line at the end or not#     DEFAULT: TruecolorInput()importhelperhelper.colorInput(text:str="",beforeColor:Optional[Terminal.color.foreground]=Terminal.color.RESET)ORfromhelperimportcolorInputcolorInput(text:str="",beforeColor:Optional[Terminal.color.foreground]=Terminal.color.RESET)# Gets an input## executes the input() function in cyan and changes the color back to beforeColor if given## Parameters# ----------# text: Optional[str]#     The text that is printed before getting the input#     DEFAULT: None# beforeColor: Optional[Terminal.color.foreground]#     The color that was used before (if u want it to change back)#     DEFAULT: Nonekdict()importhelperx=helper.kdict(dictionary)ORfromhelperimportkdictx=kdict(dictionary)# Like dict but accessible with x.key and x["key"]## A class that creates a dict that is also accessible by using x.key, not just by using x["key"]## How To Use# ----------# x = kdict({"key": value, ...})# y = x.key# print(y) # Output: value## OR## d = {"key": value, ...}# x = kdict(d)# y = x.key# print(y) # Output: valueKWArgsHandler()importhelperx=helper.KWArgsHandler(kwargs,*args:Union[str|tuple(str,type,any)])ORfromhelperimportKWArgsHandlerx=KWArgsHandler(kwargs,*args:Union[str|tuple(str,type,any)])# Handles allowed keywords and types for values in kwargs## Makes sure the parsed `kwargs` only contain allowed keywords and the correct types of values for the corresponding keywords## Parameters# ----------# kwargs: dict#	The keyword arguments to be used## *allowedKeywords: Union[str, tuple(str, type, any)]#	tuple:#		0: str: the allowed keyword#		1: type: the expected type of value (object for any)#		2: any: the default value, if not given: None#	str: the allowed keywordoutputStdout()importhelperhelper.outputStdout(outputValue)ORfromhelperimportoutputStdoutoutputStdout(outputValue)# Outputs to stdout## Outputs the given outputValue to stdout and flushes the stream after## Parameters# ----------# outputValue: Any#     The value that's written to stdoutTerminalimporthelperhelper.Terminal._# _ = subclassORfromhelperimportTerminalTerminal._# _ = subclass# Functions & Stuff for the Windows Terminal## Contains classes and Functions to use for/in the Windows Terminal## Subclasses# ----------# color:#     returns escape sequences to manipulate the color of the Terminal when printed