v1.2.1 Official Release
v1.2.1 – Major Expansion & Core System Refinement
Overview
This release represents a major step forward in the evolution of clevertools.
The library has grown from a compact utility collection into a more structured, extensible, and production-ready toolkit.
The focus of this version lies on expanding the public API, improving internal consistency, strengthening core systems such as file I/O and logging, and significantly increasing test coverage and documentation quality.
What's New
Expanded Core Utilities
- Introduction of structured file helpers for JSON and TOML
- Extended default file I/O to support both text and binary workflows
- Improved validation for unsupported modes and invalid data inputs
- Consistent handling of missing files, directories, and edge cases
Logging System Overhaul
- Refactored logging into modular building blocks
- Introduction of:
CleverToolsFormatter- Console and file handler builders
- Centralized logger option resolver
- Clean handler reset logic to prevent duplicate logs
- Built-in format presets and improved configurability
- Shared global logger instance (
log) exposed via package root
Public API Expansion
- Significantly broader top-level API exposure
- Direct access to:
- Configuration helpers
- Logging utilities
- Structured file handlers (JSON/TOML)
- Formatter and handler tools
- Extended exception hierarchy
- Reduced need for deep internal imports
File Handling Improvements
- Unified raw I/O layer with clearer behavior definitions
- Explicit support for:
- Binary reads/writes
- Safer type handling
- New structured helpers:
read_json,write_jsonread_toml,write_toml
- Features include:
- Automatic file creation
- Parse validation
- Configurable fallback behavior
Error Handling Expansion
- Massive extension of the exception hierarchy
- New categorized error domains, including:
- Validation & parsing
- Filesystem & storage
- Runtime & setup
- API & integration
- Worker, scheduler, metrics, tracing
- More expressive and scalable error modeling
Internal Model Cleanup
static.pyrenamed tomodels.py- Consolidation of:
- Defaults and literals
- Logger presets and configurations
- Write modes and internal mappings
- Improved internal structure and maintainability
Masking Enhancements
- Improved validation of invalid inputs
- Integration into shared error policy system
- More predictable fallback behavior
- Safer handling of:
- Empty values
- Invalid visibility configurations
- Incorrect mask characters
Documentation Overhaul
- Complete restructuring of documentation
- New sections introduced:
- Concepts
- Tools
- Quickstart
- Installation
- Expanded README and improved accessibility
- Dedicated pages for new utilities, including:
- Logging system components
- JSON/TOML helpers
- Formatter and handler tools
Packaging & Requirements
- Version upgrade to v1.2.1
- Minimum Python version raised to 3.11
- Updated dependencies and tooling:
ruffmypyfakertomli_w
- Improved packaging metadata and project configuration
Testing & Quality
- Significant increase in automated test coverage
- New tests for:
- Configuration handling
- Structured file I/O (JSON/TOML)
- Logging behavior and formatting
- Edge cases in default I/O
- Masking logic
- Addition of debug utilities and structured test runners
Public API (Highlights)
maskread,writeread_json,write_jsonread_toml,write_tomlconfigureconfigure_loggerget_loggerlogbuild_console_handlerbuild_file_handlerreset_handlersCleverToolsFormatterresolve_logger_options
Release Notes
This release transforms clevertools from a simple helper library into a more complete and scalable utility framework.
The system is now more modular, better structured, and easier to integrate into real-world projects.
At the same time, stronger validation, improved error handling, and expanded test coverage ensure more predictable and reliable behavior.
Note: Running the test suite may require additional dependencies such as
fakerandtomli_w.