Package: keyflow
KeyFlowKeyFlow is a Python library that provides interactive console printing with a simulated typing effect and customizable text formatting. It allows you to create dynamic and engaging command-line interfaces for your Python applications.FeaturesSimulated typing effect: Display text with a realistic typing animation.Customizable formatting: Apply foreground and background colors, underline, bold, and italics to your printed text.Error simulation: Introduce random typing errors to make the output more human-like.Prompt input: Display prompts and wait for user input with support for various input validation options.Integration with PyInputPlus: Option to use PyInputPlus functions for input handling.Easy-to-use API: Simple and intuitive functions for printing and input.InstallationYou can install KeyFlow using pip:pipinstallkeyflowUsagekfprintThekfprintfunction prints text with a simulated typing effect and supports custom foreground and background colors.fromkeyflowimportkfprintkfprint(text,speed=0.2,retype=None,fore_color=None,back_color=None,typing=True,error=0.2,underline=False,bold=False,italics=False)Parameterstext(str): The text to be printed.speed(float, optional): The typing speed in seconds per character. Default is 0.2.retype(str, optional): Text to be retyped after printing. Default is None.fore_color(str, optional): The foreground color code or name to apply to the text. Default is None.back_color(str, optional): The background color code or name to apply to the text. Default is None.highlight(str, optional): Text to be highlighted with thefore_colorandback_color, works only when typing is set to false. Default is None.typing(bool, optional): Whether to simulate typing effect. Default is True.error(float, optional): The probability of making an error while typing. Default is 0.2.underline(bool, optional): Whether to underline the text. Default is False.bold(bool, optional): Whether to bold the text. Default is False.italics(bool, optional): Whether to italicize the text. Default is False.kfinputThekfinputfunction displays text with a simulated typing effect, waits for user input, and returns the entered value.fromkeyflowimportkfinputkfinput(text,speed=0.2,retype=None,fore_color=None,back_color=None,typing=True,use_pyip=None,pyip_params={},error=0.2,underline=False,bold=False,italics=False)Parameterstext(str): The text to be displayed as a prompt.speed(float, optional): The typing speed in seconds per character. Default is 0.2.retype(str, optional): Text to be retyped after printing. Default is None.fore_color(str, optional): The foreground color code or name to apply to the text. Default is None.back_color(str, optional): The background color code or name to apply to the text. Default is None.highlight(str, optional): Text to be highlighted with thefore_colorandback_color, works only when typing is set to false. Default is None.typing(bool, optional): Whether to simulate typing effect. Default is True.use_pyip(callable, optional): Apyinputplusfunction to use for input. Default is None.pyip_params(dict, optional): Additional parameters to pass to theuse_pyipfunction. Default is an empty dictionary.error(float, optional): The probability of making an error while typing. Default is 0.2.underline(bool, optional): Whether to underline the text. Default is False.bold(bool, optional): Whether to bold the text. Default is False.italics(bool, optional): Whether to italicize the text. Default is False.Note: When typing, you can press the spacebar to pause and resume the typing animation.LicenseKeyFlow is released under theMIT License. You are free to use, modify, and distribute this library for both commercial and non-commercial purposes. Please see theLICENSEfile for more details.GitHub RepositoryFeel free to explore the repository, submit issues, and contribute to the project.To clone the repository, run the following command:gitclonehttps://github.com/aneousion/keyflow