curint 0.1.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.
curint-0.1.2/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 curint contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,12 @@
1
+ include README.md
2
+ include LICENSE
3
+ include SECURITY.md
4
+ include pyproject.toml
5
+ include setup.py
6
+ recursive-include examples *.py
7
+ recursive-include tests *.py
8
+ recursive-exclude * __pycache__
9
+ recursive-exclude * *.py[co]
10
+ recursive-exclude .pytest_cache *
11
+ recursive-exclude .ruff_cache *
12
+ recursive-exclude .mypy_cache *
curint-0.1.2/PKG-INFO ADDED
@@ -0,0 +1,167 @@
1
+ Metadata-Version: 2.1
2
+ Name: curint
3
+ Version: 0.1.2
4
+ Summary: Colorful terminal output toolkit
5
+ Author: corotosh
6
+ License: MIT
7
+ Keywords: terminal,colors,rich,ansi,gradient,animation
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Environment :: Console
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
15
+ Classifier: Topic :: Terminals
16
+ Classifier: Topic :: Utilities
17
+ Requires-Python: >=3.8
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+
21
+ curint is a Python library for colorful terminal output. It provides styled text, RGB gradients, rainbow text, themed console helpers, Rich panels and tables, status messages, prompts, logging, spinners, progress bars, and lightweight text animations.
22
+
23
+ ## Features
24
+
25
+ - True-color foreground and background styling.
26
+ - Gradient, palette, and rainbow text.
27
+ - Built-in themes such as `default`, `sunset`, `ocean`, `dracula`, and `forest`.
28
+ - Rich-backed panels, tables, trees, rules, Markdown, and JSON output.
29
+ - Status helpers: `success()`, `error()`, `warning()`, `info()`, and `debug()`.
30
+ - Simple prompts: `ask()`, `confirm()`, and `choose()`.
31
+ - Spinners, progress bars, and iterable tracking.
32
+ - Text effects: typewriter, wave, bounce, glitch, and shimmer.
33
+ - A colorful `logging.Handler` for terminal applications.
34
+
35
+ ## Quick start
36
+
37
+ ```python
38
+ from curint import SpectraConsole, Spinner, progress_bar, success
39
+
40
+ console = SpectraConsole(theme="sunset")
41
+ console.banner("curint")
42
+ console.gradient("Gradient text with a theme", bold=True)
43
+ console.rainbow("Rainbow output", bold=True)
44
+ console.panel("Useful for build scripts, demos, and terminal applications.", title="Hello")
45
+
46
+ with Spinner("Working"):
47
+ import time
48
+ time.sleep(0.5)
49
+
50
+ progress_bar(25, "Finishing", delay=0.01)
51
+ success("Done")
52
+ ```
53
+
54
+ ## Text helpers
55
+
56
+ ```python
57
+ from curint import gradient_text, highlight, palette_text, rainbow_text, style_text
58
+
59
+ print(style_text("bold cyan", fg="cyan", bold=True))
60
+ print(gradient_text("sunset gradient", "#ff5e62", "#ffd166"))
61
+ print(rainbow_text("rainbow"))
62
+ print(palette_text("neon", "neon"))
63
+ print(highlight("ship the package", "ship"))
64
+ ```
65
+
66
+ ## Console helpers
67
+
68
+ ```python
69
+ from curint import SpectraConsole
70
+
71
+ console = SpectraConsole(theme="ocean")
72
+ console.banner("release")
73
+ console.rule("checks")
74
+ console.panel("All systems ready", title="Status")
75
+ console.table(
76
+ [
77
+ {"Check": "tests", "Result": "passed"},
78
+ {"Check": "build", "Result": "passed"},
79
+ ],
80
+ title="Summary",
81
+ )
82
+ console.tree("package", {"dist": ["sdist", "wheel"], "docs": ["README"]})
83
+ console.markdown("**Markdown** rendering via Rich")
84
+ console.json({"ok": True, "version": "0.1.2"})
85
+ ```
86
+
87
+ ## Themes
88
+
89
+ ```python
90
+ from curint import Theme, register_theme, theme_names, use_theme
91
+
92
+ register_theme(
93
+ Theme(
94
+ name="brand",
95
+ primary="#7c3aed",
96
+ secondary="#06b6d4",
97
+ accent="#f59e0b",
98
+ )
99
+ )
100
+
101
+ console = use_theme("brand")
102
+ console.gradient("Custom brand theme")
103
+ print(theme_names())
104
+ ```
105
+
106
+ ## Animations
107
+
108
+ ```python
109
+ from curint import bounce, glitch, shimmer, typewriter, wave
110
+
111
+ typewriter("Typed output", delay=0.03)
112
+ wave("wave text")
113
+ bounce("bounce text")
114
+ glitch("glitch text")
115
+ shimmer("shimmer text")
116
+ ```
117
+
118
+ For tests, use frame helpers that return strings instead of printing:
119
+
120
+ ```python
121
+ from curint import glitch_frames, wave_frames
122
+
123
+ frames = wave_frames("abc", frames=3)
124
+ assert len(frames) == 3
125
+ assert glitch_frames("abc", frames=2)
126
+ ```
127
+
128
+ ## Progress and spinners
129
+
130
+ ```python
131
+ from curint import Spinner, progress_bar, rich_status, track_iter
132
+
133
+ with Spinner("Uploading"):
134
+ import time
135
+ time.sleep(0.5)
136
+
137
+ progress_bar(50, "Building", delay=0.01)
138
+
139
+ with rich_status("Indexing"):
140
+ pass
141
+
142
+ for item in track_iter(range(10), "Processing"):
143
+ pass
144
+ ```
145
+
146
+ ## Logging
147
+
148
+ ```python
149
+ from curint import configure_logging
150
+
151
+ logger = configure_logging("INFO", logger_name="curint-demo")
152
+ logger.info("Colorful logging is ready")
153
+ ```
154
+
155
+ ## Prompts
156
+
157
+ ```python
158
+ from curint import ask, choose, confirm
159
+
160
+ name = ask("Project name", default="demo")
161
+ color = choose("Theme", ["sunset", "ocean", "dracula"], default="ocean")
162
+ ready = confirm("Continue?", default=True)
163
+ ```
164
+
165
+ ## License
166
+
167
+ MIT License.
curint-0.1.2/README.md ADDED
@@ -0,0 +1,147 @@
1
+ curint is a Python library for colorful terminal output. It provides styled text, RGB gradients, rainbow text, themed console helpers, Rich panels and tables, status messages, prompts, logging, spinners, progress bars, and lightweight text animations.
2
+
3
+ ## Features
4
+
5
+ - True-color foreground and background styling.
6
+ - Gradient, palette, and rainbow text.
7
+ - Built-in themes such as `default`, `sunset`, `ocean`, `dracula`, and `forest`.
8
+ - Rich-backed panels, tables, trees, rules, Markdown, and JSON output.
9
+ - Status helpers: `success()`, `error()`, `warning()`, `info()`, and `debug()`.
10
+ - Simple prompts: `ask()`, `confirm()`, and `choose()`.
11
+ - Spinners, progress bars, and iterable tracking.
12
+ - Text effects: typewriter, wave, bounce, glitch, and shimmer.
13
+ - A colorful `logging.Handler` for terminal applications.
14
+
15
+ ## Quick start
16
+
17
+ ```python
18
+ from curint import SpectraConsole, Spinner, progress_bar, success
19
+
20
+ console = SpectraConsole(theme="sunset")
21
+ console.banner("curint")
22
+ console.gradient("Gradient text with a theme", bold=True)
23
+ console.rainbow("Rainbow output", bold=True)
24
+ console.panel("Useful for build scripts, demos, and terminal applications.", title="Hello")
25
+
26
+ with Spinner("Working"):
27
+ import time
28
+ time.sleep(0.5)
29
+
30
+ progress_bar(25, "Finishing", delay=0.01)
31
+ success("Done")
32
+ ```
33
+
34
+ ## Text helpers
35
+
36
+ ```python
37
+ from curint import gradient_text, highlight, palette_text, rainbow_text, style_text
38
+
39
+ print(style_text("bold cyan", fg="cyan", bold=True))
40
+ print(gradient_text("sunset gradient", "#ff5e62", "#ffd166"))
41
+ print(rainbow_text("rainbow"))
42
+ print(palette_text("neon", "neon"))
43
+ print(highlight("ship the package", "ship"))
44
+ ```
45
+
46
+ ## Console helpers
47
+
48
+ ```python
49
+ from curint import SpectraConsole
50
+
51
+ console = SpectraConsole(theme="ocean")
52
+ console.banner("release")
53
+ console.rule("checks")
54
+ console.panel("All systems ready", title="Status")
55
+ console.table(
56
+ [
57
+ {"Check": "tests", "Result": "passed"},
58
+ {"Check": "build", "Result": "passed"},
59
+ ],
60
+ title="Summary",
61
+ )
62
+ console.tree("package", {"dist": ["sdist", "wheel"], "docs": ["README"]})
63
+ console.markdown("**Markdown** rendering via Rich")
64
+ console.json({"ok": True, "version": "0.1.2"})
65
+ ```
66
+
67
+ ## Themes
68
+
69
+ ```python
70
+ from curint import Theme, register_theme, theme_names, use_theme
71
+
72
+ register_theme(
73
+ Theme(
74
+ name="brand",
75
+ primary="#7c3aed",
76
+ secondary="#06b6d4",
77
+ accent="#f59e0b",
78
+ )
79
+ )
80
+
81
+ console = use_theme("brand")
82
+ console.gradient("Custom brand theme")
83
+ print(theme_names())
84
+ ```
85
+
86
+ ## Animations
87
+
88
+ ```python
89
+ from curint import bounce, glitch, shimmer, typewriter, wave
90
+
91
+ typewriter("Typed output", delay=0.03)
92
+ wave("wave text")
93
+ bounce("bounce text")
94
+ glitch("glitch text")
95
+ shimmer("shimmer text")
96
+ ```
97
+
98
+ For tests, use frame helpers that return strings instead of printing:
99
+
100
+ ```python
101
+ from curint import glitch_frames, wave_frames
102
+
103
+ frames = wave_frames("abc", frames=3)
104
+ assert len(frames) == 3
105
+ assert glitch_frames("abc", frames=2)
106
+ ```
107
+
108
+ ## Progress and spinners
109
+
110
+ ```python
111
+ from curint import Spinner, progress_bar, rich_status, track_iter
112
+
113
+ with Spinner("Uploading"):
114
+ import time
115
+ time.sleep(0.5)
116
+
117
+ progress_bar(50, "Building", delay=0.01)
118
+
119
+ with rich_status("Indexing"):
120
+ pass
121
+
122
+ for item in track_iter(range(10), "Processing"):
123
+ pass
124
+ ```
125
+
126
+ ## Logging
127
+
128
+ ```python
129
+ from curint import configure_logging
130
+
131
+ logger = configure_logging("INFO", logger_name="curint-demo")
132
+ logger.info("Colorful logging is ready")
133
+ ```
134
+
135
+ ## Prompts
136
+
137
+ ```python
138
+ from curint import ask, choose, confirm
139
+
140
+ name = ask("Project name", default="demo")
141
+ color = choose("Theme", ["sunset", "ocean", "dracula"], default="ocean")
142
+ ready = confirm("Continue?", default=True)
143
+ ```
144
+
145
+ ## License
146
+
147
+ MIT License.
@@ -0,0 +1,23 @@
1
+ from curint import SpectraConsole, info, success, warning
2
+
3
+ console = SpectraConsole(theme="ocean")
4
+ console.banner("deploy")
5
+ console.rule("checks")
6
+ console.table(
7
+ [
8
+ {"Check": "tests", "Result": "passed", "Time": "12s"},
9
+ {"Check": "lint", "Result": "passed", "Time": "3s"},
10
+ {"Check": "build", "Result": "passed", "Time": "6s"},
11
+ ],
12
+ title="CI summary",
13
+ )
14
+ console.tree(
15
+ "release",
16
+ {
17
+ "package": ["sdist", "wheel"],
18
+ "publish": ["testpypi", "pypi"],
19
+ },
20
+ )
21
+ info("Uploading artifacts")
22
+ warning("Remember to tag the release")
23
+ success("Ready to publish")
@@ -0,0 +1,25 @@
1
+ from curint import SpectraConsole, Spinner, configure_logging, gradient_text, progress_bar, success
2
+
3
+ console = SpectraConsole(theme="sunset")
4
+ console.banner("curint")
5
+ console.gradient("A richer alternative terminal toolkit", bold=True)
6
+ console.rainbow("Rainbow text without manual ANSI escape codes", bold=True)
7
+ console.panel("Powered by Rich, Colorama, Termcolor, and SkyText.", title="Dependencies")
8
+ console.table(
9
+ [
10
+ {"Feature": "themes", "Example": "sunset, dracula, ocean"},
11
+ {"Feature": "widgets", "Example": "panel, table, tree, markdown, JSON"},
12
+ {"Feature": "animations", "Example": "typewriter, wave, bounce, glitch, shimmer"},
13
+ ],
14
+ title="curint features",
15
+ )
16
+
17
+ logger = configure_logging("INFO", logger_name="demo")
18
+ logger.info("Rich logging is configured")
19
+
20
+ with Spinner("pretending to upload"):
21
+ import time
22
+
23
+ time.sleep(0.5)
24
+
25
+ success("Demo complete")
@@ -0,0 +1,15 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel>=0.43"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [tool.pytest.ini_options]
6
+ addopts = "-q"
7
+ testpaths = ["tests"]
8
+ pythonpath = ["src"]
9
+
10
+ [tool.ruff]
11
+ line-length = 100
12
+ src = ["src", "tests"]
13
+
14
+ [tool.ruff.lint]
15
+ select = ["E", "F", "I", "UP", "B"]
curint-0.1.2/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
curint-0.1.2/setup.py ADDED
@@ -0,0 +1,62 @@
1
+ """Classic setuptools build script for curint.
2
+
3
+ This file is intentionally the source of package metadata so the project can be
4
+ built with either:
5
+
6
+ python setup.py sdist bdist_wheel
7
+
8
+ or a modern PEP 517 frontend such as:
9
+
10
+ python -m build
11
+ """
12
+
13
+ from __future__ import annotations
14
+
15
+ from pathlib import Path
16
+
17
+ from setuptools import find_packages, setup
18
+
19
+ ROOT = Path(__file__).parent
20
+ README = ROOT / "README.md"
21
+
22
+ INSTALL_REQUIRES = [
23
+ "colorama",
24
+ "termcolor",
25
+ "skytext",
26
+ "rich",
27
+ ]
28
+
29
+ setup(
30
+ name="curint",
31
+ version="0.1.2",
32
+ description="Colorful terminal output toolkit",
33
+ long_description=README.read_text(encoding="utf-8") if README.exists() else "",
34
+ long_description_content_type="text/markdown",
35
+ author="corotosh",
36
+ license="MIT",
37
+ package_dir={"": "src"},
38
+ packages=find_packages(where="src"),
39
+ include_package_data=True,
40
+ python_requires=">=3.8",
41
+ install_requires=INSTALL_REQUIRES,
42
+ keywords=[
43
+ "terminal",
44
+ "colors",
45
+ "rich",
46
+ "ansi",
47
+ "gradient",
48
+ "animation",
49
+ ],
50
+ classifiers=[
51
+ "Development Status :: 3 - Alpha",
52
+ "Environment :: Console",
53
+ "Intended Audience :: Developers",
54
+ "License :: OSI Approved :: MIT License",
55
+ "Operating System :: OS Independent",
56
+ "Programming Language :: Python :: 3",
57
+ "Topic :: Software Development :: Libraries :: Python Modules",
58
+ "Topic :: Terminals",
59
+ "Topic :: Utilities",
60
+ ],
61
+ zip_safe=False,
62
+ )
@@ -0,0 +1,101 @@
1
+ from __future__ import annotations
2
+
3
+ from .animations import (
4
+ bounce,
5
+ bounce_frames,
6
+ glitch,
7
+ glitch_frames,
8
+ print_animated,
9
+ print_bounce,
10
+ print_wave,
11
+ shimmer,
12
+ shimmer_frames,
13
+ typewriter,
14
+ wave,
15
+ wave_frames,
16
+ )
17
+ from .colors import PALETTES, RGB, ansi_bg, ansi_fg, blend_many, parse_color, strip_ansi
18
+ from .console import SpectraConsole, debug, error, info, success, warning
19
+ from .logging import SpectraLogHandler, configure_logging
20
+ from .progress import Spinner, SpinnerRich, progress_bar, progress_bar_rich, rich_status, track_iter
21
+ from .prompt import ask, choose, confirm
22
+ from .text import (
23
+ box,
24
+ center,
25
+ color_text,
26
+ cprint,
27
+ gradient_text,
28
+ highlight,
29
+ palette_text,
30
+ print_color,
31
+ print_gradient,
32
+ print_gradient_rich,
33
+ print_rainbow,
34
+ rainbow_text,
35
+ sky_gradient,
36
+ style_text,
37
+ termcolor_text,
38
+ )
39
+ from .theme import THEMES, Theme, get_theme, register_theme, theme_names, use_theme
40
+
41
+ __all__ = [
42
+ "PALETTES",
43
+ "RGB",
44
+ "THEMES",
45
+ "SpectraConsole",
46
+ "SpectraLogHandler",
47
+ "Spinner",
48
+ "SpinnerRich",
49
+ "Theme",
50
+ "ansi_bg",
51
+ "ansi_fg",
52
+ "ask",
53
+ "blend_many",
54
+ "bounce",
55
+ "bounce_frames",
56
+ "box",
57
+ "center",
58
+ "choose",
59
+ "color_text",
60
+ "configure_logging",
61
+ "confirm",
62
+ "cprint",
63
+ "debug",
64
+ "error",
65
+ "get_theme",
66
+ "glitch",
67
+ "glitch_frames",
68
+ "gradient_text",
69
+ "highlight",
70
+ "info",
71
+ "palette_text",
72
+ "parse_color",
73
+ "print_animated",
74
+ "print_bounce",
75
+ "print_color",
76
+ "print_gradient",
77
+ "print_gradient_rich",
78
+ "print_rainbow",
79
+ "print_wave",
80
+ "progress_bar",
81
+ "progress_bar_rich",
82
+ "rainbow_text",
83
+ "register_theme",
84
+ "rich_status",
85
+ "shimmer",
86
+ "shimmer_frames",
87
+ "sky_gradient",
88
+ "strip_ansi",
89
+ "style_text",
90
+ "success",
91
+ "termcolor_text",
92
+ "theme_names",
93
+ "track_iter",
94
+ "typewriter",
95
+ "use_theme",
96
+ "warning",
97
+ "wave",
98
+ "wave_frames",
99
+ ]
100
+
101
+ __version__ = "0.1.2"
@@ -0,0 +1,46 @@
1
+ """Compatibility shims for optional imports during local development.
2
+
3
+ The package declares its core dependencies in setup.py. The fallbacks below
4
+ let tests and docs render in constrained environments before installation.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from typing import Any
10
+
11
+ try: # pragma: no cover - exercised when dependency is installed
12
+ from colorama import Back, Fore, Style, just_fix_windows_console
13
+ except Exception: # pragma: no cover - fallback for source tree tests
14
+ class _Codes:
15
+ BLACK = RED = GREEN = YELLOW = BLUE = MAGENTA = CYAN = WHITE = RESET = RESET_ALL = ""
16
+ BRIGHT = DIM = NORMAL = ""
17
+
18
+ Fore = Back = Style = _Codes() # type: ignore[assignment]
19
+
20
+ def just_fix_windows_console() -> None:
21
+ return None
22
+
23
+ try: # pragma: no cover
24
+ from termcolor import colored
25
+ except Exception: # pragma: no cover
26
+ def colored(text: str, color: str | None = None, on_color: str | None = None, attrs: list[str] | None = None) -> str:
27
+ return text
28
+
29
+ try: # pragma: no cover
30
+ from rich.console import Console
31
+ from rich.markdown import Markdown
32
+ from rich.panel import Panel
33
+ from rich.progress import BarColumn, Progress, SpinnerColumn, TextColumn, TimeElapsedColumn, track
34
+ from rich.table import Table
35
+ from rich.text import Text
36
+ from rich.tree import Tree
37
+ except Exception as exc: # pragma: no cover
38
+ raise RuntimeError("curint requires rich. Install with `pip install curint`.") from exc
39
+
40
+ try: # pragma: no cover
41
+ import skytext as _skytext
42
+ except Exception: # pragma: no cover
43
+ _skytext = None
44
+
45
+
46
+ SKYTEXT: Any = _skytext