Package: prettypy
PrettyPyPrettyPy is a Python library that simplifies printing colored and styled messages in CLI applications. With PrettyPy, you can easily print status updates, error messages, and other types of messages with colored indicators that help them stand out.The library offers a straightforward API for creating custom layouts, as well as a range of pre-built layouts that you can use to enhance the readability of your CLI applications.PrettyPy uses ANSI escape codes to provide its coloring functionality, which is supported by most terminals. If your terminal does not support ANSI escape codes, you can set the no-color flag to disable the coloring functionality.By using PrettyPy, you can create user-friendly CLI applications that are easier to read and more engaging.GitHubPyPiFeaturesPrint messages with colors and stylesCreate custom layoutsNo color modeTable outputUpdating messagesProgress barsSpinnersDesktop notificationsInstallationpipinstallprettypyGetting StartedThe PrettyPy package is a Python library that provides an easy-to-use API for printing colored and styled messages in CLI applications. With the help of PrettyPy, you can quickly and easily print status updates, error messages, and other types of messages with colored indicators that help them stand out and improve the readability of your CLI applications.To start using PrettyPy, you need to create an instance of the Pretty class. Once you have done this, you can use the Pretty class methods for each mode to print your messages. You can also use the Pretty class as a dictionary to access its modes, and you can even reassign Python's built-in print function to one of PrettyPy's modes.If you need to create your own layouts, you can use the Composer class to customize the output even further. The Composer allows you to add new layouts, change the padding of the layout to align all your messages and improve the readability of your output.Here's a code example that demonstrates how to use the PrettyPy package:fromprettypyimportPretty# Create an instance of the Pretty classpretty=Pretty()# Use the Pretty class methods for each mode to print messagespretty.info("This is an info message.")pretty.success("This is a success message.")# Access Pretty class modes as a dictionaryformodeinpretty:pretty.__getattribute__(mode.name)(f"This is a{mode}message.")# Reassign Python's built-in print function to one of PrettyPy's modesprint=pretty.neutralprint("This is a neutral message printed using the print function.")# Use the Composer class to create new layoutscomposer=pretty.get_composer()pretty.add("test","[TEST]","red",text_format="bold")# Use new layout created by the composer print methodpretty.test("This is a test message printed using the composer print method.")# Change the padding of the layout with the Composercomposer.set_padding()# Print messages again to demonstrate the paddingpretty.info("This is an info message.")pretty.success("This is a success message.")pretty.test("This is a test message printed using the composer print method.")[i]This is an info message.[✓]This is a success message.[X]This is a error message....With the PrettyPy package, you can make your CLI applications more user-friendly, readable, and engaging. The package is easy to use, and it allows you to quickly and easily create custom layouts to suit your needs.