Skip to content

Releases: dhruvan-vyas/dvs_printf

dvs_printf v3.1.2

Choose a tag to compare

@dhruvan-vyas dhruvan-vyas released this 12 Aug 05:56

Release Notes: dvs_printf v3.1.3

Release Date: August 12, 2026
Package Version: 3.1.3
License: Apache 2.0


Summary of Changes

Version 3.1.3 delivers the enterprise-grade SafeIOSuppressor context manager for kernel-level POSIX os.dup2 file descriptor manipulation, emergency atexit restoration protection, Jupyter/Pytest environment auto-detection, comprehensive documentation overhauls, and robust CI build configuration fixes.


Key Features and Enhancements

1. Fail-Safe POSIX I/O Suppression (SafeIOSuppressor)

  • Centralized Context Engine: Replaced manual os.dup2 calls in LoadingBar and Spinner with SafeIOSuppressor, ensuring exception-safe allocation and cleanup.
  • Emergency atexit Hooks: Registered @atexit.register restoration routines to guarantee file descriptors 1 (stdout) and 2 (stderr) are restored instantly if Python exits unexpectedly or receives SIGINT (Ctrl+C).
  • Environment Auto-Detection (suppress_io="auto"): Detects Jupyter Notebook (ipykernel), pytest runners, and IDE consoles, falling back to high-level stream redirection without triggering io.UnsupportedOperation: fileno.
  • Configurable Modes: Added suppress_io support ("auto", "fd", "stream", False) to give developers fine-grained control over process-wide FD redirection vs thread-local stream isolation.

2. Comprehensive Documentation & Sub-Module Guides

  • Master & Sub-Module Guides: Completely updated README.md, loaders_README.md, colors_README.md, and printf_README.md.
  • High-Performance Benchmarks: Documented the ~16,000ns startup latency generator engine and console safe-area bounds detection (os.get_terminal_size()) for PyTorch, NumPy, and Pandas matrices.
  • 2D Angular Gradient Matrix Examples: Added code examples demonstrating rotating 2D angular spatial gradients across multi-line text grids.

3. Packaging & CI Build Stabilization

  • CI Build Fallback: Updated setup.py with dynamic README detection (os.path.exists("PYPI_README.md")), preventing FileNotFoundError during GitHub Actions CI runs or clean git clones.
  • Clean PyPI Wheel Distribution: Freshly built wheel and sdist distributions.

Release Notes: dvs_printf v3.1.0

Release Date: August 10, 2026
Package Version: 3.1.0
License: Apache 2.0


Summary of Changes

Version 3.1.0 introduces full 24-bit TrueColor angular gradient projection, multi-stop color palette interpolation, multi-threaded progress loaders, AST-based source token exception highlighting, and optimized terminal downsampling.


Key Features and Enhancements

1. Expanded Color and Gradient Engine (dvs_printf.colors)

  • Multi-Format Color Parsing: Native parsing for HEX (#RGB, #RRGGBB), RGB tuples, RGB strings (rgb: r,g,b), HSL (hsl: h,s,l), HSV (hsv: h,s,v), CMYK (cmyk: c,m,y,k), and 345+ named colors.
  • Angular 2D Gradients: Implemented 2D character-grid geometry calculation for arbitrary angle projections (0 to 360 degrees).
  • Dynamic Downsampling: Automatically degrades TrueColor (24-bit) escape sequences down to 256-color (8-bit) or 16-color (4-bit) depending on terminal environment detection (console_EnvType).

2. Animated Output Engine (dvs_printf.printf)

  • Streaming Styles: Over 20 animation styles including typing, glitch, matrix, matrix2, headline, async, wave, fire, newsline, gunshort, snip, and silverfade.
  • Data Matrix Serialization: Automatic line-by-line pretty formatting for non-string objects (list, dict, tuple, matrices).
  • Speed Multipliers: Dynamic character-delay calculations derived from style base frequencies and user speed multipliers.

3. Threaded Task Loaders (dvs_printf.loaders)

  • Background Worker Threads: Added Spinner and LoadingBar classes to execute user functions concurrently alongside animated terminal progress indicators.
  • 40+ Spinner Styles: Integrated pre-configured spinner animations (dots, arrow, moon, shark, pong, bounce, line, etc.).
  • Progress Tracking: Added ProgressUpdater for real-time iteration tracking via inject_progress.

4. AST Exception Visualizer (dvs_printf.exceptions)

  • AST Frame Analysis: Inspects stack frames using Python ast and inspect modules.
  • Token Pointing: Emits visual column pointers beneath failing source tokens.

Bug Fixes and Stability Improvements

  • Fixed setuptools setup.py build configuration for PyPI distribution.
  • Corrected division-by-zero errors in HSL and HSV fractional string conversion.
  • Normalized color string inputs by stripping whitespace and converting to lowercase before dictionary lookups.
  • Resolved ANSI escape sequence leakage upon animation loop completion.

Migration Guide

1. Unified Loaders API

Use Spinner or LoadingBar directly from dvs_printf.loaders:

from dvs_printf.loaders import Spinner, LoadingBar

# For indeterminate waiting tasks:
spinner = Spinner(title="Processing", style="dots")
result = spinner.run(my_task_function)

# For progress tracking tasks:
loader = LoadingBar(title_text="Downloading")
loader.run(my_download_function, progress_updater=True)

2. Class Naming Update

  • Use capital Init class for global configuration settings (from dvs_printf import Init). The lowercase init class is retained for backward compatibility.

Upgrade Instructions

Upgrade via pip:

pip install --upgrade dvs-printf

dvs_printf v3.1.0

Choose a tag to compare

@dhruvan-vyas dhruvan-vyas released this 11 Aug 17:06

Release Notes: dvs_printf v3.1.0

Release Date: August 10, 2026
Package Version: 3.1.0
License: Apache 2.0

Summary of Changes

Version 3.1.0 introduces full 24-bit TrueColor angular gradient projection, multi-stop color palette interpolation, multi-threaded progress loaders, AST-based source token exception highlighting, and optimized terminal downsampling.

Key Features and Enhancements

1. Expanded Color and Gradient Engine (dvs_printf.colors)

  • Multi-Format Color Parsing: Native parsing for HEX (#RGB, #RRGGBB), RGB tuples, RGB strings (rgb: r,g,b), HSL (hsl: h,s,l), HSV (hsv: h,s,v), CMYK (cmyk: c,m,y,k), and 345+ named colors.
  • Angular 2D Gradients: Implemented 2D character-grid geometry calculation for arbitrary angle projections (0 to 360 degrees).
  • Dynamic Downsampling: Automatically degrades TrueColor (24-bit) escape sequences down to 256-color (8-bit) or 16-color (4-bit) depending on terminal environment detection (console_EnvType).

2. Animated Output Engine (dvs_printf.printf)

  • Streaming Styles: Over 20 animation styles including typing, glitch, matrix, matrix2, headline, async, wave, fire, newsline, gunshort, snip, and silverfade.
  • Data Matrix Serialization: Automatic line-by-line pretty formatting for non-string objects (list, dict, tuple, matrices).
  • Speed Multipliers: Dynamic character-delay calculations derived from style base frequencies and user speed multipliers.

3. Threaded Task Loaders (dvs_printf.loaders)

  • Background Worker Threads: Added Spinner and LoadingBar classes to execute user functions concurrently alongside animated terminal progress indicators.
  • 40+ Spinner Styles: Integrated pre-configured spinner animations (dots, arrow, moon, shark, pong, bounce, line, etc.).
  • Progress Tracking: Added ProgressUpdater for real-time iteration tracking via inject_progress.

4. AST Exception Visualizer (dvs_printf.exceptions)

  • AST Frame Analysis: Inspects stack frames using Python ast and inspect modules.
  • Token Pointing: Emits visual column pointers beneath failing source tokens.

Bug Fixes and Stability Improvements

  • Fixed setuptools setup.py build configuration for PyPI distribution.
  • Corrected division-by-zero errors in HSL and HSV fractional string conversion.
  • Normalized color string inputs by stripping whitespace and converting to lowercase before dictionary lookups.
  • Resolved ANSI escape sequence leakage upon animation loop completion.

Migration Guide

1. Unified Loaders API

Use Spinner or LoadingBar directly from dvs_printf.loaders:

from dvs_printf.loaders import Spinner, LoadingBar

# For indeterminate waiting tasks:
spinner = Spinner(title="Processing", style="dots")
result = spinner.run(my_task_function)

# For progress tracking tasks:
loader = LoadingBar(title_text="Downloading")
loader.run(my_download_function, progress_updater=True)

2. Class Naming Update

  • Use capital Init class for global configuration settings (from dvs_printf import Init). The lowercase init class is retained for backward compatibility.

Upgrade Instructions

Upgrade via pip:

pip install --upgrade dvs-printf

dvs_printf v2.2

Choose a tag to compare

@dhruvan-vyas dhruvan-vyas released this 15 Jul 12:01

dvs_printf v2.2 Release Note (July 15, 2024)

Initial Release of dvs_printf.
We are thrilled to announce the v2.2 as initial release of dvs_printf, a dynamic Python module designed to enhance console output with engaging animation styles. This release includes a range of features and improvements to ensure a seamless user experience.

Use Cases

  • User Interaction: Enhance console applications with visually appealing output.
  • Progress Visualization: Use loading bars and animations to indicate progress.
  • Highlighting Information: Make important information stand out with animations.
  • Debugging and Monitoring: Facilitate better understanding and monitoring of processes through animated outputs.

Key Features

  1. printf Function:

    • Supports any data type, including custom objects.
    • Offers various animation styles such as typing, async, and headline, Center, Left, right and more animations to improve readability and user engagement.
    • Customizable parameters include style, speed, delay, getmat, stay.
  2. init Method:

    • Provides dynamic initialization, ensuring consistent formatting and animation behavior across different parts of your application.
  3. showLoding Function:

    • Implements a loading bar using threading, suitable for indicating progress during time-consuming tasks.
  4. list_of_str Function:

    • Converts different data types into a list of strings, allowing for easy integration with animated print functions.

New Features

  • Async Style:
    • Introduces a new animation style named "Async" that allows multiple lines to animate simultaneously, providing a more dynamic and visually appealing output.
    • Supports the syntax async , enabling control and animation of specific sets of lines for greater flexibility and customization.

Improvements

  • Stability Enhancements: Improved overall stability to prevent crashes and unexpected behavior during usage.
  • Code Optimization: Optimized the codebase for better performance and efficiency, reducing execution time and resource usage.

Bug Fixes

  • Line Wrapping:
    Fixed issues with lines exceeding terminal width. Lines larger than the terminal width are now split and moved to a new line for better handling and display.

  • Style Naming Error Detection: Added a feature to detect and alert users to naming errors in styles, improving the development experience.

  • Handling Invalid Values: Implemented functionality to handle unexpected values and keywords, ensuring smooth operation with suitable default values.

Additional Information:

  • Deprecation Notice: All previous versions (from v1.0 to v2.1) have been dismantled due to bugs and platform compatibility issues.

For detailed usage instructions and examples, please refer to the README on the GitHub repository.

We hope you enjoy the new features and improvements in this release. Your feedback and contributions are highly appreciated to make dvs_printf even better.

Full Changelog: https://github.com/dhruvan-vyas/dvs_printf/commits/v2.2