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)
โ”œโ”€โ”€ 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.16.1.tar.gz (194.1 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.16.1-py3-none-any.whl (289.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stouputils-1.16.1.tar.gz
  • Upload date:
  • Size: 194.1 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.16.1.tar.gz
Algorithm Hash digest
SHA256 ceed16e1c801c18b2e88bcfa28aaef620991549da43f32e08e089c180d1d93c0
MD5 92f91ae23d608e31cf6a720ca5d404f8
BLAKE2b-256 14fb3e161c31247b7a069f71a8060642e07eff9307001e3ddf429af317b209ca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stouputils-1.16.1-py3-none-any.whl
  • Upload date:
  • Size: 289.5 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.16.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0776c527690d3d7c9e69edee1bd00d3624c3e7adad61b08ca7d3bde310934c4c
MD5 b8c5adb4f6ede1a7c89826f33ef0ea3f
BLAKE2b-256 f1dc08cf827f7964736abd3d940061d839bcc97728aa64280503c83bb4987d3c

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