printcolorpy 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,19 @@
1
+ Metadata-Version: 2.4
2
+ Name: printcolorpy
3
+ Version: 0.2.0
4
+ Summary:
5
+ Author: Constructor677
6
+ Author-email: dev-miguel-mendez@proton.me
7
+ Requires-Python: >=3.12
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.12
10
+ Classifier: Programming Language :: Python :: 3.13
11
+ Classifier: Programming Language :: Python :: 3.14
12
+ Requires-Dist: colorama (>=0.4.6,<0.5.0)
13
+ Description-Content-Type: text/markdown
14
+
15
+ Once printcolorpy is installed, to see what each method of printcolorpy does run this binary:
16
+
17
+ `
18
+ printcolorpy
19
+ `
@@ -0,0 +1,5 @@
1
+ Once printcolorpy is installed, to see what each method of printcolorpy does run this binary:
2
+
3
+ `
4
+ printcolorpy
5
+ `
@@ -0,0 +1,22 @@
1
+ [project]
2
+ name = "printcolorpy"
3
+ version = "0.2.0"
4
+ description = ""
5
+ authors = [
6
+ {name = "Constructor677",email = "dev-miguel-mendez@proton.me"}
7
+ ]
8
+ readme = "README.md"
9
+ requires-python = ">=3.12"
10
+ dependencies = [
11
+ "colorama (>=0.4.6,<0.5.0)"
12
+ ]
13
+
14
+ [tool.poetry]
15
+ packages = [{include = "printcolorpy", from = "src"}]
16
+
17
+ [build-system]
18
+ requires = ["poetry-core>=2.0.0,<3.0.0"]
19
+ build-backend = "poetry.core.masonry.api"
20
+
21
+ [tool.poetry.scripts]
22
+ printcolorpy = "printcolorpy:print_color_test"
@@ -0,0 +1,7 @@
1
+ from printcolorpy.main import printcolorpy
2
+ from printcolorpy.print_color_test import print_color_test
3
+
4
+
5
+ __all__ = ["printcolorpy", "print_color_test"]
6
+
7
+
@@ -0,0 +1,36 @@
1
+ from colorama import Fore, Back, Style, init
2
+
3
+ init(autoreset=True) #! `autoreset=True` is crucial. It ensures that after each print, the color is reset and not LEAK.
4
+
5
+
6
+ #% "Style.BRIGHT" makes the text BOLDER, not brighter lol.
7
+
8
+ class PrintColorPy:
9
+ def header1(self, text: str):
10
+ #* Bold Yellow background
11
+ print(Back.YELLOW + Style.BRIGHT + text )
12
+
13
+ def header2(self, text: str):
14
+ #* Bold Yellow text
15
+ print(Fore.YELLOW + Style.BRIGHT + text )
16
+
17
+ def bold_text(self, text: str):
18
+ #* Bold white text
19
+ print(Style.BRIGHT + text)
20
+
21
+ def success(self, text: str):
22
+ #* Black text on Green background
23
+ print(Back.GREEN + text )
24
+
25
+ def error(self, text: str):
26
+ #* White text on red background
27
+ print(Back.RED + text )
28
+
29
+ def red(self, text: str):
30
+ #* Bold red text
31
+ print(Fore.RED + Style.BRIGHT + text )
32
+
33
+ def space(self, number: int = 1):
34
+ print("\n" * number)
35
+
36
+ printcolorpy = PrintColorPy()
@@ -0,0 +1,26 @@
1
+ from printcolorpy import printcolorpy
2
+
3
+ def print_color_test():
4
+ print("Header 1:")
5
+ printcolorpy.header1("Hello, World!")
6
+ print("\n")
7
+
8
+ print("Header 2:")
9
+ printcolorpy.header2("Hello, World!")
10
+ print("\n")
11
+
12
+ print("Bold Text:")
13
+ printcolorpy.bold_text("Hello, World!")
14
+ print("\n")
15
+
16
+ print("Success:")
17
+ printcolorpy.success("Hello, World!")
18
+ print("\n")
19
+
20
+ print("Error:")
21
+ printcolorpy.error("Hello, World!")
22
+ print("\n")
23
+
24
+ print("Red:")
25
+ printcolorpy.red("Hello, World!")
26
+ print("\n")
File without changes