Python module with some utils for every day code that I've usefull lately while working. Print, print colors, print warnings, print errors, save files, load files, clear bash
Project description
Welcoome to maikol-utils 🧰 V 0.0.2
maikol-utils is a lightweight and reusable Python utility package designed to speed up and clean up your everyday scripting and automation workflows.
Whether you're handling JSON files, managing the file system, cleaning up terminal outputs, or improving logging with colored messages and structured separators — this module brings a collection of practical tools ready to use.
🧑💻 Author
Developed by Miquel Gómez – Python developer. Hand-picked utilities from real-world scripting and automation tasks.
Structure
├── LICENSE
├── README.md
├── maikol-utils
│ ├── __init__.py
│ ├── file_utils.py
│ ├── print_utils.py
│ └── time_tracker.py
├── pyproject.toml
├── setup.py
└── usage_examples.ipynb
🚀 Features
- 🔹 Filesystem helpers: Easily check, load, save, and create files/directories.
- 🖨️ Colorful terminal prints: Add colored, formatted, or warning messages to your logs.
- 📜 Visual bash separators: Make your CLI outputs more structured and readable.
- 🧹 Terminal cleanup: Clear or update printed lines in-place for dynamic feedback.
📦 Installation
pip install maikol-utils- Clone it from github.
Examples of each function at the repo notebook
- This notebook
📘 Usage
from maikol_utils import save_json, load_json, print_separator, print_warn, clear_bash
# Save data to JSON
save_json("outputs/data.json", {"name": "maikol"})
# Load safely from JSON
data = load_json("outputs/data.json")
# Print a section title with visual separator
print_separator("Processing Data", sep_type="SUPER")
# Warn with color
print_warn("This file is missing some fields!")
# Clean last 2 terminal lines
clear_bash(2)
📚 Functions Overview
🗃 File system
save_json(path, content) — Save Python object to JSON.
load_json(path) — Load JSON or return empty dict if not found.
check_dirs_existance(paths) — Assert if dirs exist.
make_dirs(paths) — Create dirs if not present.
🎨 Terminal Printing
print_separator(text, sep_type) — Print formatted section headers.
print_color(text, color) — Print in red, green, blue, etc.
print_warn(text) — Print warnings wrapped in ⚠️ emojis.
print_status(msg) — Overwrite previous line with dynamic status.
clear_bash(n) — Clear n lines above in terminal.
print_clear_bash(text, n) — Clear then print a new message.
🔧 Roadmap
- Add async support for I/O.
- Option to customize color themes.
- CLI preview tool for bash formatting.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file maikol_utils-0.0.2.tar.gz.
File metadata
- Download URL: maikol_utils-0.0.2.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82eb2595263f4c04ce48cd6bc43ad5be92515ac38bfcbff2ea8af445d0756b79
|
|
| MD5 |
779b9c29e1985824a9e56e61350c5d21
|
|
| BLAKE2b-256 |
fd7298b10031f96bee9654dee91637ceca99685773d7d250f2a55ab17f2cb77d
|
File details
Details for the file maikol_utils-0.0.2-py3-none-any.whl.
File metadata
- Download URL: maikol_utils-0.0.2-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42dfe5912662f8e3b535cf59aa9fc6fd10ab08e3d9404659b045ffbf9df22c26
|
|
| MD5 |
82af00184ae4147e7813b1432190f208
|
|
| BLAKE2b-256 |
25fc09882f9119f8a4be5480ffc3e35a59bbdfb9693bd75e3f6a9310a57a8314
|