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.

๐Ÿ“– Want to see examples? Check out our Google Colab notebook with practical usage examples!

๐Ÿš€ 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, at_least_n, sort_dict_keys, upsert_in_dataframe, array_to_disk)
โ”œโ”€โ”€ typing.py        # ๐Ÿ“ Utilities for typing enhancements (IterAny, JsonDict, JsonList, ..., convert_to_serializable)
โ”œโ”€โ”€ 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.19.1.tar.gz (212.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stouputils-1.19.1-py3-none-any.whl (324.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stouputils-1.19.1.tar.gz
  • Upload date:
  • Size: 212.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for stouputils-1.19.1.tar.gz
Algorithm Hash digest
SHA256 2ce76272357143c61e16ca3db2fe3fcfc14528af10c53ec76e4bc8ddba7ec5bb
MD5 3fdef9d1048263e70627e38a432ce81a
BLAKE2b-256 8176610d002be7dbb287414fdbf6216f45f11ab7e6fb46d39f59003080565b1e

See more details on using hashes here.

File details

Details for the file stouputils-1.19.1-py3-none-any.whl.

File metadata

  • Download URL: stouputils-1.19.1-py3-none-any.whl
  • Upload date:
  • Size: 324.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for stouputils-1.19.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4cd6be488f13cf298644f7038fa9e0f3ea5b224e50f3ef15982549093192905e
MD5 2601f8ac7ec5de3f4c9e0b972df25f35
BLAKE2b-256 67e3efd4e03b110062ad03f857eb7920afaa21df0afaeda498efd8c5b09d6153

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