pyrisma 2__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.
pyrisma-2/LICENSE ADDED
@@ -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.
pyrisma-2/PKG-INFO ADDED
@@ -0,0 +1,160 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyrisma
3
+ Version: 2
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/MarleyBenicio/pyrisma
9
+ Requires-Python: >=3.9
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Dynamic: license-file
13
+
14
+ # 💬 Pyrisma
15
+
16
+ Uma biblioteca Python para exibir mensagens coloridas e estilizadas no terminal, com ícones, estilos de texto e timestamp opcional.
17
+
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
+ Requer Python >= 3.9. Sem dependências externas.
29
+
30
+ ---
31
+
32
+ ## 🧠 Uso básico
33
+
34
+ ```python
35
+ from pyrisma import terminal
36
+
37
+ terminal.info("Sistema iniciado com sucesso!")
38
+ terminal.warning("Atenção: configuração ausente.")
39
+ terminal.error("Erro crítico detectado!")
40
+ terminal.success("Processo concluído com êxito.")
41
+ terminal.debug("Valor da variável x: 42")
42
+ terminal.highlight("Isso merece destaque!")
43
+ ```
44
+
45
+ O objeto `terminal` já vem pronto para uso (é uma instância de `Colors`), mas você também pode instanciar a classe diretamente:
46
+
47
+ ```python
48
+ from pyrisma import Colors
49
+
50
+ terminal = Colors()
51
+ ```
52
+
53
+ ---
54
+
55
+ ## ⚙️ Métodos disponíveis
56
+
57
+ Todos os métodos de log têm a mesma assinatura:
58
+
59
+ ```python
60
+ terminal.<metodo>(msg: str, **kwargs)
61
+ ```
62
+
63
+ | Método | Cor aplicada |
64
+ |---------------|-------------------|
65
+ | `success` | verde brilhante |
66
+ | `error` | vermelho brilhante|
67
+ | `warning` | amarelo brilhante |
68
+ | `info` | azul |
69
+ | `debug` | magenta brilhante |
70
+ | `highlight` | branco brilhante |
71
+
72
+ ### Parâmetros opcionais (`**kwargs`)
73
+
74
+ | Parâmetro | Tipo | Padrão | Descrição |
75
+ |---------------|--------|----------|----------------------------------------------------------------------------|
76
+ | `style` | `str` | `'normal'` | Nome do estilo de texto a aplicar (ver tabela de estilos abaixo). |
77
+ | `icon` | `str` | `'void'` | Nome do ícone a exibir antes da mensagem (ver tabela de ícones abaixo). |
78
+ | `time_clock` | `bool` | `False` | Se `True`, adiciona um timestamp `[YYYY-MM-DD HH:MM:SS]` antes da mensagem. |
79
+
80
+ Exemplo usando todos os parâmetros:
81
+
82
+ ```python
83
+ terminal.success(
84
+ "Backup concluído",
85
+ style="bold",
86
+ icon="success",
87
+ time_clock=True,
88
+ )
89
+ # [2026-09-11 10:30:00] ✅ Backup concluído
90
+ ```
91
+
92
+ ---
93
+
94
+ ## 🎨 Estilos disponíveis (`style`)
95
+
96
+ ```
97
+ normal, bold, italic, underline, double_underline,
98
+ blink, reverse, hidden, strike, reset
99
+ ```
100
+
101
+ ## 🔣 Ícones disponíveis (`icon`)
102
+
103
+ ```
104
+ void, info, error, debug, success, warning, highlight
105
+ ```
106
+
107
+ ---
108
+
109
+ ## 🧰 Métodos utilitários
110
+
111
+ Além dos métodos de log, a classe `Colors` expõe utilitários para montar suas próprias mensagens formatadas:
112
+
113
+ ```python
114
+ from pyrisma import Colors
115
+
116
+ c = Colors()
117
+
118
+ c.color("red") # retorna o código ANSI da cor "red"
119
+ c.icon("warning") # retorna o ícone associado a "warning"
120
+ c.reset() # retorna o código ANSI de reset ("\033[0m")
121
+ ```
122
+
123
+ Cores de texto disponíveis em `color()`:
124
+
125
+ ```
126
+ black, red, green, yellow, blue, magenta, cyan, white,
127
+ bright_black, bright_red, bright_green, bright_yellow,
128
+ bright_blue, bright_magenta, bright_cyan, bright_white,
129
+ bg_black, bg_red, bg_green, bg_yellow, bg_blue, bg_magenta,
130
+ bg_cyan, bg_white, bg_bright_black, bg_bright_red,
131
+ bg_bright_green, bg_bright_yellow, bg_bright_blue,
132
+ bg_bright_magenta, bg_bright_cyan, bg_bright_white
133
+ ```
134
+
135
+ ---
136
+
137
+ ## ⚙️ Funcionalidades
138
+
139
+ - Mensagens com cores e ícones contextuais.
140
+ - Suporte a diferentes níveis de log (`success`, `error`, `warning`, `info`, `debug`, `highlight`).
141
+ - Estilos de texto (negrito, itálico, sublinhado, etc).
142
+ - Timestamp opcional em cada mensagem.
143
+ - Acesso direto a cores e ícones para composições personalizadas.
144
+ - Sem dependências externas.
145
+
146
+ ---
147
+
148
+ ## 📄 Licença
149
+
150
+ Distribuído sob a licença MIT. Veja o arquivo [LICENSE](LICENSE) para mais informações.
151
+
152
+ ---
153
+
154
+ ## 👤 Autor
155
+
156
+ **Marley Benicio**
157
+ Desenvolvedor de Software
158
+
159
+ 📧 marleysbenicio@gmail.com
160
+ 🔗 [GitHub](https://github.com/MarleyBenicio/pyrisma)
pyrisma-2/README.md ADDED
@@ -0,0 +1,147 @@
1
+ # 💬 Pyrisma
2
+
3
+ Uma biblioteca Python para exibir mensagens coloridas e estilizadas no terminal, com ícones, estilos de texto e timestamp opcional.
4
+
5
+ Ideal para quem quer logs mais visuais, legíveis e com um toque de personalidade.
6
+
7
+ ---
8
+
9
+ ## 🚀 Instalação
10
+
11
+ ```bash
12
+ pip install pyrisma
13
+ ```
14
+
15
+ Requer Python >= 3.9. Sem dependências externas.
16
+
17
+ ---
18
+
19
+ ## 🧠 Uso básico
20
+
21
+ ```python
22
+ from pyrisma import terminal
23
+
24
+ terminal.info("Sistema iniciado com sucesso!")
25
+ terminal.warning("Atenção: configuração ausente.")
26
+ terminal.error("Erro crítico detectado!")
27
+ terminal.success("Processo concluído com êxito.")
28
+ terminal.debug("Valor da variável x: 42")
29
+ terminal.highlight("Isso merece destaque!")
30
+ ```
31
+
32
+ O objeto `terminal` já vem pronto para uso (é uma instância de `Colors`), mas você também pode instanciar a classe diretamente:
33
+
34
+ ```python
35
+ from pyrisma import Colors
36
+
37
+ terminal = Colors()
38
+ ```
39
+
40
+ ---
41
+
42
+ ## ⚙️ Métodos disponíveis
43
+
44
+ Todos os métodos de log têm a mesma assinatura:
45
+
46
+ ```python
47
+ terminal.<metodo>(msg: str, **kwargs)
48
+ ```
49
+
50
+ | Método | Cor aplicada |
51
+ |---------------|-------------------|
52
+ | `success` | verde brilhante |
53
+ | `error` | vermelho brilhante|
54
+ | `warning` | amarelo brilhante |
55
+ | `info` | azul |
56
+ | `debug` | magenta brilhante |
57
+ | `highlight` | branco brilhante |
58
+
59
+ ### Parâmetros opcionais (`**kwargs`)
60
+
61
+ | Parâmetro | Tipo | Padrão | Descrição |
62
+ |---------------|--------|----------|----------------------------------------------------------------------------|
63
+ | `style` | `str` | `'normal'` | Nome do estilo de texto a aplicar (ver tabela de estilos abaixo). |
64
+ | `icon` | `str` | `'void'` | Nome do ícone a exibir antes da mensagem (ver tabela de ícones abaixo). |
65
+ | `time_clock` | `bool` | `False` | Se `True`, adiciona um timestamp `[YYYY-MM-DD HH:MM:SS]` antes da mensagem. |
66
+
67
+ Exemplo usando todos os parâmetros:
68
+
69
+ ```python
70
+ terminal.success(
71
+ "Backup concluído",
72
+ style="bold",
73
+ icon="success",
74
+ time_clock=True,
75
+ )
76
+ # [2026-09-11 10:30:00] ✅ Backup concluído
77
+ ```
78
+
79
+ ---
80
+
81
+ ## 🎨 Estilos disponíveis (`style`)
82
+
83
+ ```
84
+ normal, bold, italic, underline, double_underline,
85
+ blink, reverse, hidden, strike, reset
86
+ ```
87
+
88
+ ## 🔣 Ícones disponíveis (`icon`)
89
+
90
+ ```
91
+ void, info, error, debug, success, warning, highlight
92
+ ```
93
+
94
+ ---
95
+
96
+ ## 🧰 Métodos utilitários
97
+
98
+ Além dos métodos de log, a classe `Colors` expõe utilitários para montar suas próprias mensagens formatadas:
99
+
100
+ ```python
101
+ from pyrisma import Colors
102
+
103
+ c = Colors()
104
+
105
+ c.color("red") # retorna o código ANSI da cor "red"
106
+ c.icon("warning") # retorna o ícone associado a "warning"
107
+ c.reset() # retorna o código ANSI de reset ("\033[0m")
108
+ ```
109
+
110
+ Cores de texto disponíveis em `color()`:
111
+
112
+ ```
113
+ black, red, green, yellow, blue, magenta, cyan, white,
114
+ bright_black, bright_red, bright_green, bright_yellow,
115
+ bright_blue, bright_magenta, bright_cyan, bright_white,
116
+ bg_black, bg_red, bg_green, bg_yellow, bg_blue, bg_magenta,
117
+ bg_cyan, bg_white, bg_bright_black, bg_bright_red,
118
+ bg_bright_green, bg_bright_yellow, bg_bright_blue,
119
+ bg_bright_magenta, bg_bright_cyan, bg_bright_white
120
+ ```
121
+
122
+ ---
123
+
124
+ ## ⚙️ Funcionalidades
125
+
126
+ - Mensagens com cores e ícones contextuais.
127
+ - Suporte a diferentes níveis de log (`success`, `error`, `warning`, `info`, `debug`, `highlight`).
128
+ - Estilos de texto (negrito, itálico, sublinhado, etc).
129
+ - Timestamp opcional em cada mensagem.
130
+ - Acesso direto a cores e ícones para composições personalizadas.
131
+ - Sem dependências externas.
132
+
133
+ ---
134
+
135
+ ## 📄 Licença
136
+
137
+ Distribuído sob a licença MIT. Veja o arquivo [LICENSE](LICENSE) para mais informações.
138
+
139
+ ---
140
+
141
+ ## 👤 Autor
142
+
143
+ **Marley Benicio**
144
+ Desenvolvedor de Software
145
+
146
+ 📧 marleysbenicio@gmail.com
147
+ 🔗 [GitHub](https://github.com/MarleyBenicio/pyrisma)
@@ -0,0 +1,18 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "pyrisma"
7
+ version = "2"
8
+ authors = [
9
+ { name="Marley Benicio", email="marleysbenicio@gmail.com" }
10
+ ]
11
+ description = "Uma biblioteca para deixar mensagens coloridas e estilosas no terminal."
12
+ readme = "README.md"
13
+ license = { text = "MIT" }
14
+ requires-python = ">=3.9"
15
+ dependencies = []
16
+
17
+ [project.urls]
18
+ Homepage = "https://github.com/MarleyBenicio/pyrisma"
pyrisma-2/setup.cfg ADDED
@@ -0,0 +1,31 @@
1
+ [metadata]
2
+ name = pyrisma
3
+ version = 0.0.1
4
+ author = Marley
5
+ author_email = marleysbenicio@gmail.com
6
+ description = Biblioteca Python para exibir mensagens coloridas e com ícones no terminal.
7
+ long_description = file: README.md
8
+ long_description_content_type = text/markdown
9
+ license = MIT
10
+ classifiers =
11
+ Programming Language :: Python :: 3
12
+ License :: OSI Approved :: MIT License
13
+ Operating System :: OS Independent
14
+ Development Status :: 4 - Beta
15
+ Intended Audience :: Developers
16
+ Topic :: Software Development :: Libraries
17
+
18
+ [options]
19
+ package_dir =
20
+ = src
21
+ packages = find:
22
+ python_requires = >=3.9
23
+ include_package_data = True
24
+
25
+ [options.packages.find]
26
+ where = src
27
+
28
+ [egg_info]
29
+ tag_build =
30
+ tag_date = 0
31
+
@@ -0,0 +1,162 @@
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)}{chr(160)}',
63
+ 'error': f'{chr(10060)}{chr(160)}',
64
+ 'debug': f'{chr(9935)}{chr(160)} ',
65
+ 'success': f'{chr(9989)}{chr(160)}',
66
+ 'warning': f'{chr(10071)}{chr(160)}',
67
+ 'highlight': f'{chr(10062)}{chr(160)}',
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 = None, **kwargs) -> None:
82
+ style: str = 'normal'
83
+ icon: bool = 'void'
84
+ time_clock: bool = False
85
+
86
+ icon = kwargs.get('icon', icon)
87
+ style = kwargs.get('style', style)
88
+
89
+ _clock: datetime = f'[{datetime.now().strftime("%Y-%m-%d %H:%M:%S")}] ' if kwargs.get('time_clock') == True else ''
90
+
91
+ print(f"{_clock}{self.icons[icon]}{self.colors['bright_green']}{self.colors[style]}{msg}{self.reset()}")
92
+ return None
93
+
94
+ # Erro
95
+ def error(self, msg: str = None, **kwargs) -> None:
96
+ style: str = 'normal'
97
+ icon: bool = 'void'
98
+ time_clock: bool = False
99
+
100
+ icon = kwargs.get('icon', icon)
101
+ style = kwargs.get('style', style)
102
+
103
+ _clock: datetime = f'[{datetime.now().strftime("%Y-%m-%d %H:%M:%S")}] ' if kwargs.get('time_clock') == True else ''
104
+
105
+ print(f"{_clock}{self.icons[icon]}{self.colors['bright_red']}{self.colors[style]}{msg}{self.reset()}")
106
+ return None
107
+
108
+ # Aviso
109
+ def warning(self, msg: str = None, **kwargs) -> None:
110
+ style: str = 'normal'
111
+ icon: bool = 'void'
112
+ time_clock: bool = False
113
+
114
+ icon = kwargs.get('icon', icon)
115
+ style = kwargs.get('style', style)
116
+
117
+ _clock: datetime = f'[{datetime.now().strftime("%Y-%m-%d %H:%M:%S")}] ' if kwargs.get('time_clock') == True else ''
118
+
119
+ print(f"{_clock}{self.icons[icon]}{self.colors['bright_yellow']}{self.colors[style]}{msg}{self.reset()}")
120
+ return None
121
+
122
+ # Informação
123
+ def info(self, msg: str, **kwargs) -> None:
124
+ style: str = 'normal'
125
+ icon: bool = 'void'
126
+ time_clock: bool = False
127
+
128
+ icon = kwargs.get('icon', icon)
129
+ style = kwargs.get('style', style)
130
+
131
+ _clock: datetime = f'[{datetime.now().strftime("%Y-%m-%d %H:%M:%S")}] ' if kwargs.get('time_clock') == True else ''
132
+
133
+ print(f"{_clock}{self.icons[icon]}{self.colors['blue']}{self.colors[style]}{msg}{self.reset()}")
134
+ return None
135
+
136
+ # Debug
137
+ def debug(self, msg: str, **kwargs) -> None:
138
+ style: str = 'normal'
139
+ icon: bool = 'void'
140
+ time_clock: bool = False
141
+
142
+ icon = kwargs.get('icon', icon)
143
+ style = kwargs.get('style', style)
144
+
145
+ _clock: datetime = f'[{datetime.now().strftime("%Y-%m-%d %H:%M:%S")}] ' if kwargs.get('time_clock') == True else ''
146
+
147
+ print(f"{_clock}{self.icons[icon]}{self.colors['bright_magenta']}{self.colors[style]}{msg}{self.reset()}")
148
+ return None
149
+
150
+ # Importante / Destaque
151
+ def highlight(self, msg: str, **kwargs) -> None:
152
+ style: str = 'normal'
153
+ icon: bool = 'void'
154
+ time_clock: bool = False
155
+
156
+ icon = kwargs.get('icon', icon)
157
+ style = kwargs.get('style', style)
158
+
159
+ _clock: datetime = f'[{datetime.now().strftime("%Y-%m-%d %H:%M:%S")}] ' if kwargs.get('time_clock') == True else ''
160
+
161
+ print(f"{_clock}{self.icons[icon]}{self.colors['bright_white']}{self.colors[style]}{msg}{self.reset()}")
162
+ return None
@@ -0,0 +1,5 @@
1
+ from .Colors import Colors
2
+
3
+ __all__ = ["Colors"]
4
+
5
+ terminal = Colors()
@@ -0,0 +1,160 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyrisma
3
+ Version: 2
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/MarleyBenicio/pyrisma
9
+ Requires-Python: >=3.9
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Dynamic: license-file
13
+
14
+ # 💬 Pyrisma
15
+
16
+ Uma biblioteca Python para exibir mensagens coloridas e estilizadas no terminal, com ícones, estilos de texto e timestamp opcional.
17
+
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
+ Requer Python >= 3.9. Sem dependências externas.
29
+
30
+ ---
31
+
32
+ ## 🧠 Uso básico
33
+
34
+ ```python
35
+ from pyrisma import terminal
36
+
37
+ terminal.info("Sistema iniciado com sucesso!")
38
+ terminal.warning("Atenção: configuração ausente.")
39
+ terminal.error("Erro crítico detectado!")
40
+ terminal.success("Processo concluído com êxito.")
41
+ terminal.debug("Valor da variável x: 42")
42
+ terminal.highlight("Isso merece destaque!")
43
+ ```
44
+
45
+ O objeto `terminal` já vem pronto para uso (é uma instância de `Colors`), mas você também pode instanciar a classe diretamente:
46
+
47
+ ```python
48
+ from pyrisma import Colors
49
+
50
+ terminal = Colors()
51
+ ```
52
+
53
+ ---
54
+
55
+ ## ⚙️ Métodos disponíveis
56
+
57
+ Todos os métodos de log têm a mesma assinatura:
58
+
59
+ ```python
60
+ terminal.<metodo>(msg: str, **kwargs)
61
+ ```
62
+
63
+ | Método | Cor aplicada |
64
+ |---------------|-------------------|
65
+ | `success` | verde brilhante |
66
+ | `error` | vermelho brilhante|
67
+ | `warning` | amarelo brilhante |
68
+ | `info` | azul |
69
+ | `debug` | magenta brilhante |
70
+ | `highlight` | branco brilhante |
71
+
72
+ ### Parâmetros opcionais (`**kwargs`)
73
+
74
+ | Parâmetro | Tipo | Padrão | Descrição |
75
+ |---------------|--------|----------|----------------------------------------------------------------------------|
76
+ | `style` | `str` | `'normal'` | Nome do estilo de texto a aplicar (ver tabela de estilos abaixo). |
77
+ | `icon` | `str` | `'void'` | Nome do ícone a exibir antes da mensagem (ver tabela de ícones abaixo). |
78
+ | `time_clock` | `bool` | `False` | Se `True`, adiciona um timestamp `[YYYY-MM-DD HH:MM:SS]` antes da mensagem. |
79
+
80
+ Exemplo usando todos os parâmetros:
81
+
82
+ ```python
83
+ terminal.success(
84
+ "Backup concluído",
85
+ style="bold",
86
+ icon="success",
87
+ time_clock=True,
88
+ )
89
+ # [2026-09-11 10:30:00] ✅ Backup concluído
90
+ ```
91
+
92
+ ---
93
+
94
+ ## 🎨 Estilos disponíveis (`style`)
95
+
96
+ ```
97
+ normal, bold, italic, underline, double_underline,
98
+ blink, reverse, hidden, strike, reset
99
+ ```
100
+
101
+ ## 🔣 Ícones disponíveis (`icon`)
102
+
103
+ ```
104
+ void, info, error, debug, success, warning, highlight
105
+ ```
106
+
107
+ ---
108
+
109
+ ## 🧰 Métodos utilitários
110
+
111
+ Além dos métodos de log, a classe `Colors` expõe utilitários para montar suas próprias mensagens formatadas:
112
+
113
+ ```python
114
+ from pyrisma import Colors
115
+
116
+ c = Colors()
117
+
118
+ c.color("red") # retorna o código ANSI da cor "red"
119
+ c.icon("warning") # retorna o ícone associado a "warning"
120
+ c.reset() # retorna o código ANSI de reset ("\033[0m")
121
+ ```
122
+
123
+ Cores de texto disponíveis em `color()`:
124
+
125
+ ```
126
+ black, red, green, yellow, blue, magenta, cyan, white,
127
+ bright_black, bright_red, bright_green, bright_yellow,
128
+ bright_blue, bright_magenta, bright_cyan, bright_white,
129
+ bg_black, bg_red, bg_green, bg_yellow, bg_blue, bg_magenta,
130
+ bg_cyan, bg_white, bg_bright_black, bg_bright_red,
131
+ bg_bright_green, bg_bright_yellow, bg_bright_blue,
132
+ bg_bright_magenta, bg_bright_cyan, bg_bright_white
133
+ ```
134
+
135
+ ---
136
+
137
+ ## ⚙️ Funcionalidades
138
+
139
+ - Mensagens com cores e ícones contextuais.
140
+ - Suporte a diferentes níveis de log (`success`, `error`, `warning`, `info`, `debug`, `highlight`).
141
+ - Estilos de texto (negrito, itálico, sublinhado, etc).
142
+ - Timestamp opcional em cada mensagem.
143
+ - Acesso direto a cores e ícones para composições personalizadas.
144
+ - Sem dependências externas.
145
+
146
+ ---
147
+
148
+ ## 📄 Licença
149
+
150
+ Distribuído sob a licença MIT. Veja o arquivo [LICENSE](LICENSE) para mais informações.
151
+
152
+ ---
153
+
154
+ ## 👤 Autor
155
+
156
+ **Marley Benicio**
157
+ Desenvolvedor de Software
158
+
159
+ 📧 marleysbenicio@gmail.com
160
+ 🔗 [GitHub](https://github.com/MarleyBenicio/pyrisma)
@@ -0,0 +1,10 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ setup.cfg
5
+ src/pyrisma/Colors.py
6
+ src/pyrisma/__init__.py
7
+ src/pyrisma.egg-info/PKG-INFO
8
+ src/pyrisma.egg-info/SOURCES.txt
9
+ src/pyrisma.egg-info/dependency_links.txt
10
+ src/pyrisma.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ pyrisma