Skip to main content

Stouputils is a collection of utility modules designed to simplify and enhance the development process. It includes a range of tools for tasks such as execution of doctests, display utilities, decorators, as well as context managers, and many more.

Project description

๐Ÿ› ๏ธ Project Badges

GitHub PyPI - Downloads Documentation

๐Ÿ“š Project Overview

Stouputils is a collection of utility modules designed to simplify and enhance the development process.
It includes a range of tools for tasks such as execution of doctests, display utilities, decorators, as well as context managers.
Start now by installing the package: pip install stouputils.

๐Ÿš€ Project File Tree

<style> .code-tree { border-radius: 6px; padding: 16px; font-family: monospace; line-height: 1.45; overflow: auto; white-space: pre; background-color:rgb(43, 43, 43); color: #d4d4d4; } .code-tree a { color: #569cd6; text-decoration: none; } .code-tree a:hover { text-decoration: underline; } .code-tree .comment { color:rgb(231, 213, 48); } .code-tree .paren { color: orange; } </style>
stouputils/
โ”œโ”€โ”€ print.py         # ๐Ÿ–จ๏ธ Utility functions for printing (info, debug, warning, error, whatisit, breakpoint, colored_for_loop, ...)
โ”œโ”€โ”€ decorators.py    # ๐ŸŽฏ Decorators (measure_time, handle_error, timeout, retry, simple_cache, abstract, deprecated, silent)
โ”œโ”€โ”€ ctx.py           # ๐Ÿ”‡ Context managers (LogToFile, MeasureTime, Muffle, DoNothing, SetMPStartMethod)
โ”œโ”€โ”€ io.py            # ๐Ÿ’พ Utilities for file management (json_dump, json_load, csv_dump, csv_load, read_file, super_copy, super_open, clean_path, ...)
โ”œโ”€โ”€ parallel.py      # ๐Ÿ”€ Utility functions for parallel processing (multiprocessing, multithreading, run_in_subprocess)
โ”œโ”€โ”€ image.py         # ๐Ÿ–ผ๏ธ Little utilities for image processing (image_resize, auto_crop, numpy_to_gif, numpy_to_obj)
โ”œโ”€โ”€ collections.py   # ๐Ÿงฐ Utilities for collection manipulation (unique_list, sort_dict_keys, upsert_in_dataframe, array_to_disk)
โ”œโ”€โ”€ all_doctests.py  # โœ… Run all doctests for all modules in a given directory (launch_tests, test_module_with_progress)
โ”œโ”€โ”€ backup.py        # ๐Ÿ’พ Utilities for backup management (delta backup, consolidate)
โ”œโ”€โ”€ archive.py       # ๐Ÿ“ฆ Functions for creating and managing archives
โ”‚
โ”œโ”€โ”€ applications/
โ”‚   โ”œโ”€โ”€ automatic_docs.py    # ๐Ÿ“š Documentation generation utilities (used to create this documentation)
โ”‚   โ”œโ”€โ”€ upscaler/            # ๐Ÿ”Ž Image & Video upscaler (configurable)
โ”‚   โ””โ”€โ”€ ...
โ”‚
โ”œโ”€โ”€ continuous_delivery/
โ”‚   โ”œโ”€โ”€ cd_utils.py          # ๐Ÿ”ง Utilities for continuous delivery
โ”‚   โ”œโ”€โ”€ github.py            # ๐Ÿ“ฆ Utilities for continuous delivery on GitHub (upload_to_github)
โ”‚   โ”œโ”€โ”€ pypi.py              # ๐Ÿ“ฆ Utilities for PyPI (pypi_full_routine)
โ”‚   โ”œโ”€โ”€ pyproject.py         # ๐Ÿ“ Utilities for reading, writing and managing pyproject.toml files
โ”‚   โ”œโ”€โ”€ stubs.py             # ๐Ÿ“ Utilities for generating stub files using stubgen
โ”‚   โ””โ”€โ”€ ...
โ”‚
โ”œโ”€โ”€ data_science/
โ”‚   โ”œโ”€โ”€ config/              # โš™๏ธ Configuration utilities for data science
โ”‚   โ”œโ”€โ”€ dataset/             # ๐Ÿ“Š Dataset handling (dataset, dataset_loader, grouping_strategy)
โ”‚   โ”œโ”€โ”€ data_processing/     # ๐Ÿ”„ Data processing utilities (image augmentation, preprocessing)
โ”‚   โ”‚   โ”œโ”€โ”€ image/           # ๐Ÿ–ผ๏ธ Image processing techniques
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ models/              # ๐Ÿง  ML/DL model interfaces and implementations
โ”‚   โ”‚   โ”œโ”€โ”€ keras/           # ๐Ÿค– Keras model implementations
โ”‚   โ”‚   โ”œโ”€โ”€ keras_utils/     # ๐Ÿ› ๏ธ Keras utilities (callbacks, losses, visualizations)
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ scripts/             # ๐Ÿ“œ Data science scripts (augment, preprocess, routine)
โ”‚   โ”œโ”€โ”€ metric_utils.py      # ๐Ÿ“ Static methods for calculating various ML metrics
โ”‚   โ”œโ”€โ”€ mlflow_utils.py      # ๐Ÿ“Š Utility functions for working with MLflow
โ”‚   โ””โ”€โ”€ ...
โ”‚
โ”œโ”€โ”€ installer/
โ”‚   โ”œโ”€โ”€ common.py            # ๐Ÿ”ง Common functions used by the Linux and Windows installers modules
โ”‚   โ”œโ”€โ”€ downloader.py        # โฌ‡๏ธ Functions for downloading and installing programs from URLs
โ”‚   โ”œโ”€โ”€ linux.py             # ๐Ÿง Linux/macOS specific implementations for installation
โ”‚   โ”œโ”€โ”€ main.py              # ๐Ÿš€ Core installation functions for installing programs from zip files or URLs
โ”‚   โ”œโ”€โ”€ windows.py           # ๐Ÿ’ป Windows specific implementations for installation
โ”‚   โ””โ”€โ”€ ...
โ””โ”€โ”€ ...

๐Ÿ”ง Installation

pip install stouputils

โœจ Enable Tab Completion on Linux (Optional)

For a better CLI experience, enable bash tab completion:

# Option 1: Using argcomplete's global activation
activate-global-python-argcomplete --user

# Option 2: Manual setup for bash
register-python-argcomplete stouputils >> ~/.bashrc
source ~/.bashrc

After enabling completion, you can use <TAB> to autocomplete commands:

stouputils <TAB>        # Shows: --version, -v, all_doctests, backup
stouputils all_<TAB>    # Completes to: all_doctests

Note: Tab completion works best in bash, zsh, Git Bash, or WSL on Windows.

โญ Star History

Star History Chart

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

stouputils-1.10.4.tar.gz (184.1 kB view details)

Uploaded Source

File details

Details for the file stouputils-1.10.4.tar.gz.

File metadata

  • Download URL: stouputils-1.10.4.tar.gz
  • Upload date:
  • Size: 184.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for stouputils-1.10.4.tar.gz
Algorithm Hash digest
SHA256 45a129a99b399365f5376d93a2c484e745ac502f9f21d46cd7b48088e1f6ed46
MD5 d051a5a74ca5fc024130f7518ee25f42
BLAKE2b-256 d06b028736300ccb9a599d1a1454f2c7ad31c7118f9b798460f1d19096891280

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page