Skip to content

P3T - Python Pyenv Poetry Template

The main class of your application package.

This class is used to encapsulate the main functionality of your application. You can define methods and properties here to perform the main tasks of your application.

__init__()

Initialize the main class of your application package.

This method is called when an instance of the main class is created. You can use this method to perform any necessary setup for your application.

print(text='\nHello, world!', color=f'rgb({128},{128},{128})')

Print a message in a specified color or in a random color if no color is specified.


text (Optional[str]): The message to print. Defaults to "Hello, world!".
color (Optional[str]): The color to print the message in.
                       This should be a string specifying a color recognized by the `rich` library,
                       or an RGB color in the format "rgb(r,g,b)" where r, g, and b are integers between 0 and 255.
                       If this argument is not provided, a mid-grey color rgb(128,128,128) will be generated.

None

Run the main functionality of your application package.

This function is called when your application is run as a package. You can use this function to perform the main tasks of your application.