Pyrisma 0.0.1__py3-none-any.whl

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.
pyrisma/Colors.py ADDED
@@ -0,0 +1,132 @@
1
+ from datetime import datetime
2
+ class Colors:
3
+ def __init__(self) -> None:
4
+ self.colors = {
5
+ # Text colors (normal)
6
+ 'black' : "\033[30m",
7
+ 'red' : "\033[31m",
8
+ 'green' : "\033[32m",
9
+ 'yellow' : "\033[33m",
10
+ 'blue' : "\033[34m",
11
+ 'magenta' : "\033[35m",
12
+ 'cyan' : "\033[36m",
13
+ 'white' : "\033[37m",
14
+
15
+ # Bright text colors
16
+ 'bright_black' : "\033[90m",
17
+ 'bright_red' : "\033[91m",
18
+ 'bright_green' : "\033[92m",
19
+ 'bright_yellow' : "\033[93m",
20
+ 'bright_blue' : "\033[94m",
21
+ 'bright_magenta' : "\033[95m",
22
+ 'bright_cyan' : "\033[96m",
23
+ 'bright_white' : "\033[97m",
24
+
25
+ # Background colors (normal)
26
+ 'bg_black' : "\033[40m",
27
+ 'bg_red' : "\033[41m",
28
+ 'bg_green' : "\033[42m",
29
+ 'bg_yellow' : "\033[43m",
30
+ 'bg_blue' : "\033[44m",
31
+ 'bg_magenta' : "\033[45m",
32
+ 'bg_cyan' : "\033[46m",
33
+ 'bg_white' : "\033[47m",
34
+
35
+ # Bright backgrounds
36
+ 'bg_bright_black' : "\033[100m",
37
+ 'bg_bright_red' : "\033[101m",
38
+ 'bg_bright_green' : "\033[102m",
39
+ 'bg_bright_yellow' : "\033[103m",
40
+ 'bg_bright_blue' : "\033[104m",
41
+ 'bg_bright_magenta' : "\033[105m",
42
+ 'bg_bright_cyan' : "\033[106m",
43
+ 'bg_bright_white' : "\033[107m",
44
+
45
+ # Styles
46
+ 'bold' : "\033[1m",
47
+ 'italic' : "\033[3m",
48
+ 'underline' : "\033[4m",
49
+ 'double_underline' : "\033[21m",
50
+ 'blink' : "\033[5m",
51
+ 'reverse' : "\033[7m",
52
+ 'hidden' : "\033[8m",
53
+ 'strike' : "\033[9m",
54
+
55
+ # Reset
56
+ 'reset' : "\033[0m",
57
+ 'normal' : "\033[2m"
58
+ }
59
+
60
+ self.icons = {
61
+ 'void': '',
62
+ 'info': f'{chr(10069)} ',
63
+ 'error': f'{chr(10060)} ',
64
+ 'debug': f'{chr(10067)} ',
65
+ 'success': f'{chr(9989)} ',
66
+ 'warning': f'{chr(10071)} ',
67
+ 'highlight': f'{chr(10062)} ',
68
+ }
69
+
70
+ # Métodos utilitários
71
+ def color(self, name: str) -> str:
72
+ return self.colors.get(name, self.colors['reset'])
73
+
74
+ def icon(self, name: str) -> str:
75
+ return self.icons.get(name, '')
76
+
77
+ def reset(self) -> str:
78
+ return self.colors['reset']
79
+
80
+ # Sucesso
81
+ def success(self, msg: str, style: str = None, icon: bool = False, icon_blink: bool = False, time_clock: bool = False) -> None:
82
+ style = style if style else 'normal'
83
+ _clock = f'[{datetime.now().strftime("%Y-%m-%d %H:%M:%S")}] ' if time_clock else ''
84
+ name_icon = 'void' if not icon else 'success'
85
+ blink_icon = 'blink' if icon_blink else 'normal'
86
+ print(f"{_clock}{self.colors[blink_icon]}{self.icons[name_icon]}{self.colors['green']}{self.colors[style]}{msg}{self.reset()}")
87
+ return None
88
+
89
+ # Erro
90
+ def error(self, msg: str, style: str = None, icon: bool = False, icon_blink: bool = False, time_clock: bool = False) -> None:
91
+ style = style if style else 'normal'
92
+ _clock = f'[{datetime.now().strftime("%Y-%m-%d %H:%M:%S")}] ' if time_clock else ''
93
+ name_icon = 'void' if not icon else 'error'
94
+ blink_icon = 'blink' if icon_blink else 'normal'
95
+ print(f"{_clock}{self.colors[blink_icon]}{self.icons[name_icon]}{self.colors['bright_red']}{self.colors[style]}{msg}{self.reset()}")
96
+ return None
97
+
98
+ # Aviso
99
+ def warning(self, msg: str, style: str = None, icon: bool = False, icon_blink: bool = False, time_clock: bool = False) -> None:
100
+ style = style if style else 'normal'
101
+ _clock = f'[{datetime.now().strftime("%Y-%m-%d %H:%M:%S")}] ' if time_clock else ''
102
+ name_icon = 'void' if not icon else 'warning'
103
+ blink_icon = 'blink' if icon_blink else 'normal'
104
+ print(f"{_clock}{self.colors[blink_icon]}{self.icons[name_icon]}{self.colors['bright_yellow']}{self.colors[style]}{msg}{self.reset()}")
105
+ return None
106
+
107
+ # Informação
108
+ def info(self, msg: str, style: str = None, icon: bool = False, icon_blink: bool = False, time_clock: bool = False) -> None:
109
+ style = style if style else 'normal'
110
+ _clock = f'[{datetime.now().strftime("%Y-%m-%d %H:%M:%S")}] ' if time_clock else ''
111
+ name_icon = 'void' if not icon else 'info'
112
+ blink_icon = 'blink' if icon_blink else 'normal'
113
+ print(f"{_clock}{self.colors[blink_icon]}{self.icons[name_icon]}{self.colors['bright_blue']}{self.colors[style]}{msg}{self.reset()}")
114
+ return None
115
+
116
+ # Debug
117
+ def debug(self, msg: str, style: str = None, icon: bool = False, icon_blink: bool = False, time_clock: bool = False) -> None:
118
+ style = style if style else 'normal'
119
+ _clock = f'[{datetime.now().strftime("%Y-%m-%d %H:%M:%S")}] ' if time_clock else ''
120
+ name_icon = 'void' if not icon else 'debug'
121
+ blink_icon = 'blink' if icon_blink else 'normal'
122
+ print(f"{_clock}{self.colors[blink_icon]}{self.icons[name_icon]}{self.colors['bright_magenta']}{self.colors[style]}{msg}{self.reset()}")
123
+ return None
124
+
125
+ # Importante / Destaque
126
+ def highlight(self, msg: str, style: str = None, icon: bool = False, icon_blink: bool = False, time_clock: bool = False) -> None:
127
+ style = style if style else 'normal'
128
+ _clock = f'[{datetime.now().strftime("%Y-%m-%d %H:%M:%S")}] ' if time_clock else ''
129
+ name_icon = 'void' if not icon else 'highlight'
130
+ blink_icon = 'blink' if icon_blink else 'normal'
131
+ print(f"{_clock}{self.colors[blink_icon]}{self.icons[name_icon]}{self.colors['bright_white']}{self.colors[style]}{msg}{self.reset()}")
132
+ return None
pyrisma/__init__.py ADDED
@@ -0,0 +1,5 @@
1
+ from .Colors import Colors
2
+
3
+ __all__ = ["Colors"]
4
+
5
+ terminal = Colors()
@@ -0,0 +1,92 @@
1
+ Metadata-Version: 2.4
2
+ Name: Pyrisma
3
+ Version: 0.0.1
4
+ Summary: Uma biblioteca para deixar mensagens coloridas e estilosas no terminal.
5
+ Author: Marley
6
+ Author-email: Marley Benicio <marleysbenicio@gmail.com>
7
+ License: MIT
8
+ Project-URL: Homepage, https://github.com/seuusuario/minha-biblioteca
9
+ Requires-Python: >=3.9
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Dynamic: license-file
13
+
14
+ # 🧾 README.md
15
+ # 💬 Pyrisma
16
+
17
+ Uma biblioteca Python para exibir mensagens coloridas e estilizadas no terminal, com ícones e formatação moderna.
18
+ Ideal para quem quer logs mais visuais, legíveis e com um toque de personalidade.
19
+
20
+ ---
21
+
22
+ ## 🚀 Instalação
23
+
24
+ ```bash
25
+ pip install pyrisma
26
+ ```
27
+
28
+ # 🧠 Uso básico
29
+ ```python
30
+ from pyrisma import terminal
31
+
32
+ terminal.info("Sistema iniciado com sucesso!")
33
+ terminal.warning("Atenção: configuração ausente.")
34
+ terminal.error("Erro crítico detectado!")
35
+ terminal.success("Processo concluído com êxito.")
36
+ ```
37
+
38
+ ### Primeiro argumento: Mensagem: str
39
+ ```python
40
+ terminal.info('mensagem')
41
+ ```
42
+ ### Segundo argumento: Estilo: str
43
+ ```python
44
+ terminal.info('mensagem', 'bold')
45
+ ```
46
+ ### Terceiro argumento: Ícone: bool
47
+ ```python
48
+ terminal.info('mensagem', 'bold', True)
49
+ ```
50
+ ### Quarto argumento: Intermitência: bool
51
+ ```python
52
+ terminal.info('mensagem', 'bold', True, True)
53
+ ```
54
+ ### Quinto argumento: Timestamp: bool
55
+ ```python
56
+ terminal.info('mensagem', 'bold', True, True, True)
57
+ ```
58
+
59
+ ### Saída esperada (com cores e ícones, dependendo do terminal):
60
+
61
+ ```bash
62
+ ℹ️ Sistema iniciado com sucesso!
63
+
64
+ ⚠️ Atenção: configuração ausente.
65
+
66
+ ❌ Erro crítico detectado!
67
+
68
+ ✅ Processo concluído com êxito.
69
+ ```
70
+
71
+ # ⚙️ Funcionalidades
72
+
73
+ - ### Mensagens com cores e ícones contextuais.
74
+
75
+ - ### Suporte a diferentes níveis de log.
76
+
77
+ - ### Compatível com Linux e macOS.
78
+
79
+ - ### Sem dependências externas pesadas.
80
+
81
+ # 📄 Licença
82
+
83
+ ### Distribuído sob a licença MIT.
84
+ ### Veja o arquivo LICENSE para mais informações.
85
+
86
+ # 👤 Autor
87
+ ## 💼 LinkedIn
88
+ - ### Marley
89
+ - ### Desenvolvedor de Software
90
+
91
+
92
+ ### 📧 marleysbenicio@gmail.com
@@ -0,0 +1,7 @@
1
+ pyrisma/Colors.py,sha256=JTmuaRqpeWDQ6vmgIPM4G9DNSjIkVSJwXGdPiwH9NLU,5676
2
+ pyrisma/__init__.py,sha256=ZUbebDYKs77jFezutNpibtULPPylSLZLc--d7-bLcG0,69
3
+ pyrisma-0.0.1.dist-info/licenses/LICENSE,sha256=dhp3IdrOnCI8ah90zPQHS3AoD57ko0jk4InuvRkk-0g,1119
4
+ pyrisma-0.0.1.dist-info/METADATA,sha256=oqC0cO0hYp0eWtHwkeEO5nhohtCjUW4Hsa9qGWLaTKI,2062
5
+ pyrisma-0.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
+ pyrisma-0.0.1.dist-info/top_level.txt,sha256=aNMtiLFuIw2Um3g9epGU1PqC5AREnzEHulaktEfNcPE,8
7
+ pyrisma-0.0.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,27 @@
1
+
2
+ ---
3
+
4
+ ## 📜 `LICENSE` (Licença MIT)
5
+
6
+ ```text
7
+ MIT License
8
+
9
+ Copyright (c) 2025 Marley
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the “Software”), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ pyrisma