kopitools 0.1.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.

Potentially problematic release.


This version of kopitools might be problematic. Click here for more details.

@@ -0,0 +1,5 @@
1
+ Metadata-Version: 2.4
2
+ Name: kopitools
3
+ Version: 0.1.0
4
+ Summary: Rw31w j3ww1$53qf1y s3 f3w$5q1p r7$7 9q @w7 ns
5
+ Requires-Python: >=3.11
File without changes
@@ -0,0 +1,12 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "kopitools"
7
+ version = "0.1.0"
8
+ description = "Rw31w j3ww1$53qf1y s3 f3w$5q1p r7$7 9q @w7 ns"
9
+ requires-python = ">=3.11"
10
+
11
+ [tool.hatch.build.targets.wheel]
12
+ packages = ["src/kopitools"]
File without changes
@@ -0,0 +1 @@
1
+ from .paint import paint
@@ -0,0 +1,74 @@
1
+ from typing import Any
2
+
3
+ class Paint:
4
+ RED = "\033[31m"
5
+ GREEN = "\033[32m"
6
+ YELLOW = "\033[33m"
7
+ BLUE = "\033[34m"
8
+ PURPLE = "\033[35m"
9
+ CYAN = "\033[36m"
10
+ LIGHT_GRAY = "\033[37m"
11
+
12
+ RESET = "\033[0m"
13
+ BOLD = "\033[1m"
14
+ ITALIC = "\033[3m"
15
+ UNDERLINE = "\033[4m"
16
+
17
+ def __init__(self, texts, sep, end):
18
+ self.texts = texts
19
+ self.codes = []
20
+ self.sep = sep
21
+ self.end = end
22
+
23
+ def show(self):
24
+ print(self, end = self.end)
25
+
26
+ def red(self):
27
+ self.codes.append(Paint.RED)
28
+ return self
29
+
30
+ def green(self):
31
+ self.codes.append(Paint.GREEN)
32
+ return self
33
+
34
+ def yellow(self):
35
+ self.codes.append(Paint.YELLOW)
36
+ return self
37
+
38
+ def blue(self):
39
+ self.codes.append(Paint.BLUE)
40
+ return self
41
+
42
+ def purple(self):
43
+ self.codes.append(Paint.PURPLE)
44
+ return self
45
+
46
+ def cyan(self):
47
+ self.codes.append(Paint.CYAN)
48
+ return self
49
+
50
+ def gray(self):
51
+ self.codes.append(Paint.LIGHT_GRAY)
52
+ return self
53
+
54
+ def bold(self):
55
+ self.codes.append(Paint.BOLD)
56
+ return self
57
+
58
+ def italic(self):
59
+ self.codes.append(Paint.ITALIC)
60
+ return self
61
+
62
+ def underline(self):
63
+ self.codes.append(Paint.UNDERLINE)
64
+ return self
65
+
66
+ def __str__(self):
67
+ COLORS = "".join(self.codes)
68
+ STRING = self.sep.join(str(text) for text in self.texts)
69
+ RESET = Paint.RESET
70
+
71
+ return f"{COLORS}{STRING}{RESET}"
72
+
73
+ def paint(*texts: Any, sep = " ", end = "\n") -> Paint:
74
+ return Paint(texts, sep, end)
@@ -0,0 +1 @@
1
+ from .clear import clear
@@ -0,0 +1,6 @@
1
+ from time import sleep
2
+ import os
3
+
4
+ def clear(time: float) -> None:
5
+ sleep(time)
6
+ os.system("cls" if os.name == "nt" else "clear")
@@ -0,0 +1,5 @@
1
+ from clitoolset.colors import paint
2
+ from clitoolset.utils import clear
3
+
4
+ paint("hola mundo").show()
5
+ clear(0.5)