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, 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.18.0.tar.gz (210.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.18.0-py3-none-any.whl (322.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stouputils-1.18.0.tar.gz
  • Upload date:
  • Size: 210.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.18.0.tar.gz
Algorithm Hash digest
SHA256 9d9425c7fc3ade5e8df333d92393cb66f6809a9b5ddefc112150f7daae2b7a0a
MD5 e719096b724830326dce57074616fb8c
BLAKE2b-256 a73a83892ca6efcfd0ab50023439c49bcd558bd2b04b572b91904cbb47231cc0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stouputils-1.18.0-py3-none-any.whl
  • Upload date:
  • Size: 322.2 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.18.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bfbf02e372cf3fcf9d6e881fc21a1c408985991eb2ba3c19e489561847ad5039
MD5 e3df44266dfb3463b0b7cc9176f2168e
BLAKE2b-256 35bcbaac200983b7f0a8a24435895da995ecd42e81c6d78ecaab03b012774df5

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