util_pkgs#
pyufunc includes selected wrappers around third-party utility packages. These packages are maintained by their original projects; pyufunc documents source package, repository, documentation, and license information in wrapper docstrings. The wrappers are included as convenience APIs and should not be read as a claim that every wrapped function is widely used or performance-improving. Users should evaluate optional dependencies and project-specific tradeoffs before using a wrapper in production code.
psutil#
pyhelpers#
Common filesystem, serialization, string, and dictionary helpers#
|
Forward to |
|
Forward to |
|
Forward to |
|
Forward to |
|
Forward to |
|
Forward to |
|
Forward to |
|
Forward to |
|
Forward to |
|
Forward to |
|
Forward to |
|
Forward to |
|
Forward to |
|
Forward to |
pyutil#
General-purpose helpers from pyutil#
|
Instantiate |
|
Forward to |
|
Forward to |
|
Forward to |
imutils#
Image and OpenCV convenience helpers#
|
Forward to |
|
Forward to |
|
Forward to |
|
Forward to |
|
Forward to |
|
Forward to |
|
Forward to |
|
Forward to |
|
Forward to |
|
Forward to |
|
Forward to |
|
Forward to |
platformdirs#
Platform-specific application directories#
|
Return the platform-specific user cache directory for an app. |
|
Return the platform-specific user config directory for an app. |
|
Return the platform-specific user data directory for an app. |
|
Return the platform-specific user log directory for an app. |
filelock#
File locking and safe writes#
|
Write JSON while holding a file lock. |
|
Write pickle data while holding a file lock. |
|
Write text while holding a file lock. |
|
Return a file lock context manager. |
pathspec#
Gitignore-style pattern matching#
|
Collect files under a directory while excluding gitignore matches. |
|
Return paths that are not ignored by gitignore-style patterns. |
|
Return whether a path matches gitignore-style patterns. |
|
Load a gitignore-style file into a pathspec matcher. |
more-itertools#
Iterable recipes and grouping helpers#
|
Split an iterable into fixed-size chunks. |
|
Flatten nested iterables. |
|
Split an iterable when a pair-wise predicate is true. |
|
Yield unique items while preserving first-seen order. |
|
Return sliding windows over an iterable. |
humanize#
Human-readable formatting helpers#
|
Format a byte count as a human-readable file size. |
|
Format a number with comma separators. |
|
Format a large number as human-readable text. |
|
Format a duration as human-readable text. |
tenacity#
Retry helpers#
|
Call a function with retry attempts. |
|
Decorate a function to retry on selected exceptions. |
|
Decorate a function with exponential backoff retry behavior. |
boltons#
Nested data, atomic file, string, and time helpers#
|
Atomically write text or bytes to a file. |
|
Flatten one level of nested iterables. |
|
Parse human-readable duration text into |
|
Transform nested mappings and sequences with |
|
Convert text to a slug with |
toolz#
Functional data helpers#
|
Count item frequencies in a sequence. |
|
Group items by a key function or mapping key. |
|
Merge dictionaries with later values taking precedence. |
|
Pipe a value through a sequence of functions. |
|
Return a sliding window over a sequence. |
python-benedict#
Nested dictionary key-path helpers#
|
Flatten a nested dictionary. |
|
Get a nested dictionary value by key path. |
|
Set a nested dictionary value by key path. |
|
Serialize a mapping to JSON with python-benedict. |
|
Unflatten a dictionary. |
loguru#
Logger setup helpers#
|
Disable loguru logging for a logger name. |
|
Enable loguru logging for a logger name. |
|
Add a file sink to the loguru logger. |
|
Add a simple stderr loguru logger. |
Package inspection#
Package public-function discovery and dependent usage helpers#
|
Collect dependent repositories and detect target package function usage. |
|
Show package-level public functions defined by a Python package. |
|
Save a dictionary to a JSON file with pretty formatting. |