step-printer 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.
@@ -0,0 +1,19 @@
1
+ # Virtual environments
2
+ .venv/
3
+ venv/
4
+ env/
5
+
6
+ # Python byte-compiled / caches
7
+ __pycache__/
8
+ *.py[cod]
9
+ *$py.class
10
+
11
+ # Packaging & build artifacts
12
+ dist/
13
+ build/
14
+ *.egg-info/
15
+
16
+ # Testing & linter caches
17
+ .pytest_cache/
18
+ .ruff_cache/
19
+ .coverage
@@ -0,0 +1,10 @@
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ # Editor-based HTTP Client requests
5
+ /httpRequests/
6
+ # Ignored default folder with query files
7
+ /queries/
8
+ # Datasource local storage ignored files
9
+ /dataSources/
10
+ /dataSources.local.xml
@@ -0,0 +1 @@
1
+ step-printer
@@ -0,0 +1,40 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="IncorrectHttpHeaderInspection" enabled="true" level="WARNING" enabled_by_default="true">
5
+ <option name="customHeaders">
6
+ <set>
7
+ <option value=" &quot;text&quot;" />
8
+ </set>
9
+ </option>
10
+ </inspection_tool>
11
+ <inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
12
+ <option name="ignoredPackages">
13
+ <list>
14
+ <option value="scikit-learn" />
15
+ <option value="python-dotenv" />
16
+ <option value="pandas" />
17
+ <option value="google-api-python-client" />
18
+ <option value="google-auth-httplib2" />
19
+ <option value="google-auth-oauthlib" />
20
+ <option value="fastapi" />
21
+ <option value="uvicorn" />
22
+ </list>
23
+ </option>
24
+ </inspection_tool>
25
+ <inspection_tool class="PyStubPackagesAdvertiser" enabled="true" level="WARNING" enabled_by_default="true">
26
+ <option name="ignoredPackages">
27
+ <list>
28
+ <option value="pandas" />
29
+ </list>
30
+ </option>
31
+ </inspection_tool>
32
+ <inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
33
+ <option name="ignoredIdentifiers">
34
+ <list>
35
+ <option value="map.__getitem__" />
36
+ </list>
37
+ </option>
38
+ </inspection_tool>
39
+ </profile>
40
+ </component>
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <settings>
3
+ <option name="USE_PROJECT_PROFILE" value="false" />
4
+ <version value="1.0" />
5
+ </settings>
6
+ </component>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager" version="2" project-jdk-name="~/Sites/project/python/StepPrint/.venv" project-jdk-type="Python SDK" />
4
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/StepPrint.iml" filepath="$PROJECT_DIR$/.idea/StepPrint.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="PYTHON_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$">
5
+ <excludeFolder url="file://$MODULE_DIR$/.venv" />
6
+ </content>
7
+ <orderEntry type="jdk" jdkName="~/Sites/project/python/StepPrint/.venv" jdkType="Python SDK" />
8
+ <orderEntry type="sourceFolder" forTests="false" />
9
+ </component>
10
+ <component name="PackageRequirementsSettings" />
11
+ <component name="PyDocumentationSettings" />
12
+ <component name="ReSTService" />
13
+ <component name="TestRunnerService" />
14
+ </module>
@@ -0,0 +1,74 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="AutoImportSettings">
4
+ <option name="autoReloadType" value="ALL" />
5
+ </component>
6
+ <component name="ChangeListManager">
7
+ <list default="true" id="3694cb0d-601e-4ae2-9ea8-efb0a4d5a678" name="Changes" comment="" />
8
+ <option name="SHOW_DIALOG" value="false" />
9
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
10
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
11
+ <option name="LAST_RESOLUTION" value="IGNORE" />
12
+ </component>
13
+ <component name="FileTemplateManagerImpl">
14
+ <option name="RECENT_TEMPLATES">
15
+ <list>
16
+ <option value="Python Script" />
17
+ </list>
18
+ </option>
19
+ </component>
20
+ <component name="ProjectColorInfo"><![CDATA[{
21
+ "associatedIndex": 7,
22
+ "fromUser": false
23
+ }]]></component>
24
+ <component name="ProjectId" id="3MoMptOQ6zP49FqSCD1taqsi37B" />
25
+ <component name="ProjectViewState">
26
+ <option name="hideEmptyMiddlePackages" value="true" />
27
+ <option name="showLibraryContents" value="true" />
28
+ </component>
29
+ <component name="PropertiesComponent"><![CDATA[{
30
+ "keyToString": {
31
+ "ModuleVcsDetector.initialDetectionPerformed": "true",
32
+ "RunOnceActivity.ShowReadmeOnStart": "true",
33
+ "RunOnceActivity.typescript.service.memoryLimit.init": "true",
34
+ "codeWithMe.voiceChat.enabledByDefault": "false",
35
+ "kronk.content.tree.expanded.paths": "",
36
+ "node.js.detected.package.eslint": "true",
37
+ "node.js.detected.package.tslint": "true",
38
+ "node.js.selected.package.eslint": "(autodetect)",
39
+ "node.js.selected.package.tslint": "(autodetect)",
40
+ "nodejs_package_manager_path": "npm",
41
+ "python.packages.toolwindow.project.migrated.to.right.top.v2": "true"
42
+ }
43
+ }]]></component>
44
+ <component name="RunManager">
45
+ <configuration default="true" type="LATEX_RUN_CONFIGURATION" factoryName="LaTeX configuration factory">
46
+ <steps>
47
+ <latexmkCompile id="97731dff-7c72-4d63-81a9-09890c6a6327" />
48
+ <pdfViewer id="57969ffe-fa94-4ce4-82fa-528b60086248" />
49
+ </steps>
50
+ <method v="2" />
51
+ </configuration>
52
+ </component>
53
+ <component name="SharedIndexes">
54
+ <attachedChunks>
55
+ <set>
56
+ <option value="bundled-python-sdk-73a66231627c-5bd6d13a2a75-com.jetbrains.pycharm.pro.sharedIndexes.bundled-PY-262.10968.92" />
57
+ </set>
58
+ </attachedChunks>
59
+ </component>
60
+ <component name="TaskManager">
61
+ <task active="true" id="Default" summary="Default task">
62
+ <changelist id="3694cb0d-601e-4ae2-9ea8-efb0a4d5a678" name="Changes" comment="" />
63
+ <created>1796012652947</created>
64
+ <option name="number" value="Default" />
65
+ <option name="presentableId" value="Default" />
66
+ <updated>1796012652947</updated>
67
+ <workItem from="1796012653958" duration="333000" />
68
+ </task>
69
+ <servers />
70
+ </component>
71
+ <component name="TypeScriptGeneratedFilesManager">
72
+ <option name="version" value="3" />
73
+ </component>
74
+ </project>
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Yosua Yerikho
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,73 @@
1
+ Metadata-Version: 2.5
2
+ Name: step-printer
3
+ Version: 0.1.0
4
+ Summary: Reusable colored step logger powered by Rich
5
+ Author-email: Yosua Yerikho <yosua.yerikho123@gmail.com>
6
+ License: MIT
7
+ Requires-Python: >=3.9
8
+ Requires-Dist: rich>=14.3.3
9
+ Description-Content-Type: text/markdown
10
+
11
+ # step-printer
12
+
13
+ A lightweight Python utility for printing numbered, color-coded terminal steps powered by [Rich](https://github.com).
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ pip install step-printer
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ ```python
24
+ from step_printer import step, reset_current_step
25
+
26
+ # Default step (increments counter, blue info color)
27
+ step("Initializing application...")
28
+
29
+ # Custom status colors
30
+ step("Configuration loaded", {"status": "success"})
31
+ step("Cache miss, fetching fresh data", {"status": "warning"})
32
+ step("Failed to connect to secondary server", {"status": "error"})
33
+
34
+ # Print a message without incrementing the step counter (shows [-])
35
+ step("Additional details without a step number", {"with_step": False})
36
+
37
+ # Reset the counter back to 1
38
+ reset_current_step()
39
+ step("Starting new workflow")
40
+ ```
41
+
42
+ ## Configuration Options
43
+
44
+ Pass an optional dictionary as the second argument to `step(text, config)`:
45
+
46
+ | Key | Type | Default | Description |
47
+ | :--- | :--- | :--- | :--- |
48
+ | `status` | `str` | `"info"` | Text color preset: `"info"` (blue), `"success"` (green), `"warning"` (yellow), or `"error"` (red). |
49
+ | `with_step` | `bool` | `True` | If `True`, displays and increments `[1]`, `[2]`, etc. If `False`, displays `[-]` without incrementing. |
50
+
51
+ ## License
52
+
53
+ MIT License
54
+
55
+ Copyright (c) 2026 Yosua Yerikho
56
+
57
+ Permission is hereby granted, free of charge, to any person obtaining a copy
58
+ of this software and associated documentation files (the "Software"), to deal
59
+ in the Software without restriction, including without limitation the rights
60
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
61
+ copies of the Software, and to permit persons to whom the Software is
62
+ furnished to do so, subject to the following conditions:
63
+
64
+ The above copyright notice and this permission notice shall be included in all
65
+ copies or substantial portions of the Software.
66
+
67
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
68
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
69
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
70
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
71
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
72
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
73
+ SOFTWARE.
@@ -0,0 +1,63 @@
1
+ # step-printer
2
+
3
+ A lightweight Python utility for printing numbered, color-coded terminal steps powered by [Rich](https://github.com).
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install step-printer
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```python
14
+ from step_printer import step, reset_current_step
15
+
16
+ # Default step (increments counter, blue info color)
17
+ step("Initializing application...")
18
+
19
+ # Custom status colors
20
+ step("Configuration loaded", {"status": "success"})
21
+ step("Cache miss, fetching fresh data", {"status": "warning"})
22
+ step("Failed to connect to secondary server", {"status": "error"})
23
+
24
+ # Print a message without incrementing the step counter (shows [-])
25
+ step("Additional details without a step number", {"with_step": False})
26
+
27
+ # Reset the counter back to 1
28
+ reset_current_step()
29
+ step("Starting new workflow")
30
+ ```
31
+
32
+ ## Configuration Options
33
+
34
+ Pass an optional dictionary as the second argument to `step(text, config)`:
35
+
36
+ | Key | Type | Default | Description |
37
+ | :--- | :--- | :--- | :--- |
38
+ | `status` | `str` | `"info"` | Text color preset: `"info"` (blue), `"success"` (green), `"warning"` (yellow), or `"error"` (red). |
39
+ | `with_step` | `bool` | `True` | If `True`, displays and increments `[1]`, `[2]`, etc. If `False`, displays `[-]` without incrementing. |
40
+
41
+ ## License
42
+
43
+ MIT License
44
+
45
+ Copyright (c) 2026 Yosua Yerikho
46
+
47
+ Permission is hereby granted, free of charge, to any person obtaining a copy
48
+ of this software and associated documentation files (the "Software"), to deal
49
+ in the Software without restriction, including without limitation the rights
50
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
51
+ copies of the Software, and to permit persons to whom the Software is
52
+ furnished to do so, subject to the following conditions:
53
+
54
+ The above copyright notice and this permission notice shall be included in all
55
+ copies or substantial portions of the Software.
56
+
57
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
58
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
59
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
60
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
61
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
62
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
63
+ SOFTWARE.
@@ -0,0 +1,17 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "step-printer"
7
+ version = "0.1.0"
8
+ description = "Reusable colored step logger powered by Rich"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = { text = "MIT" }
12
+ authors = [
13
+ { name = "Yosua Yerikho", email = "yosua.yerikho123@gmail.com" },
14
+ ]
15
+ dependencies = [
16
+ "rich>=14.3.3",
17
+ ]
@@ -0,0 +1,3 @@
1
+ from .logger import step, reset_current_step
2
+
3
+ __all__ = ["step", "reset_current_step"]
@@ -0,0 +1,33 @@
1
+ from rich import print
2
+
3
+ current = 1
4
+
5
+ def reset_current_step():
6
+ global current
7
+ current = 1
8
+
9
+ def step(text, config=None):
10
+ global current
11
+
12
+ if config is not None and not isinstance(config, dict):
13
+ raise TypeError("Config must be a dictionary")
14
+
15
+ with_step = config['with_step'] if config is not None and 'with_step' in config else True
16
+ status = config['status'] if config is not None and 'status' in config else 'info'
17
+
18
+ inside_bracket_text = current if with_step else '-'
19
+ text_color = color(status)
20
+
21
+ print(text_color['start'] + ("[" + str(inside_bracket_text) + "] ") + text + text_color['end'])
22
+
23
+ if with_step:
24
+ current += 1
25
+
26
+ def color(status):
27
+ statuses = {
28
+ 'info': {'start': '[blue]', 'end': '[/blue]'},
29
+ 'success': {'start': '[green]', 'end': '[/green]'},
30
+ 'warning': {'start': '[yellow]', 'end': '[/yellow]'},
31
+ 'error': {'start': '[red]', 'end': '[/red]'},
32
+ }
33
+ return statuses[status] if status in statuses else {'start': '[blue]', 'end': '[/blue]'}