pyufunc is a Python package that groups utility functions for common tasks such as path and file handling, date and time conversion, data processing, testing helpers, image utilities, and selected wrappers around third-party utility packages.
The package is intended to reduce small amounts of repeated project code by making selected utility functions available through one namespace. The selection is based on the maintainers' review of existing utility packages, package metadata such as PyPI download badges and repository activity, and exploratory dependent-repository scans saved under datasets/util_pkgs_dependents_func_usage. These sources provide evidence for reviewed packages and observed examples of usage; they do not prove that every utility in pyufunc is widely used.
Note
Suggestions for new utilities, evidence about external usage, and reports about attribution or licensing can be submitted at https://github.com/xyluo25/pyufunc/issues.
- Documented utility functions: Public functions include type hints and docstrings. Third-party wrapper functions document their source package, source repository, source documentation, source license, and a usage example.
- Categorized API surface:
show_util_func_by_category()reports 253 public utility entries across the current package categories, including 94 entries inutil_pkgs. - Optional dependency handling: Utilities that depend on optional packages use dependency checks. Missing optional dependencies are reported instead of being installed automatically.
- Evidence tracking: The package review table records PyPI version badges, PyPI download badges where available, GitHub latest-commit badges, repository links, and package descriptions. Exploratory dependent-usage JSON files are stored under
datasets/util_pkgs_dependents_func_usage. - Extensibility: New utilities can be added as focused modules with tests, docstrings, source attribution, and optional dependency guards.
pyufunc should not be read as claiming that every included function is among the most frequently used Python utilities. The current evidence is narrower:
- The package exposes 253 public utility entries in the current source tree, grouped by category through
show_util_func_by_category(). docs/md_files/utility_function_pkg_review.mdlists reviewed packages with package metadata badges, including downloads and latest commit where available.- The local dependent-usage datasets contain exploratory GitHub scans for 16 packages. In the current checked-in data,
psutil.jsonrecords 35 valid function references across 5 dependent repositories,pyhelpers.jsonrecords 175 valid function references across 4 dependent repositories, andpyutil.jsonrecords 20 valid function references across 13 dependent repositories. Several other scans found no references or were limited by GitHub rate limits. - The datasets are useful for prioritization, but they are not a complete measurement of all GitHub, private-code, or production usage.
pyufunc also does not claim general runtime performance improvements. Some wrapped third-party packages, such as orjson, may be designed for performance-sensitive use cases, but pyufunc itself should be evaluated for performance in the context of a specific task and baseline implementation.
Centralizing utility functions has practical costs:
- A larger API surface can make search and selection harder if users do not know the function name or category.
- Optional wrappers may require additional package installation before they can run.
- A centralized package must maintain attribution, licenses, tests, dependency behavior, and compatibility across many utility domains.
- Project-specific helper functions can sometimes be clearer than importing a general-purpose helper from pyufunc.
For these reasons, pyufunc is best treated as a curated utility collection rather than a replacement for project-specific design decisions.
Tip
pyufunc does not install optional dependencies automatically. If a utility function needs a package that is not available in the working environment, pyufunc reports the missing dependency and skips the function call. Users can install the dependency manually, or explicitly opt in with auto_install=True where supported.
The category listing is a generated index of public functions grouped by pyufunc subpackage. It is intended for navigation and API discovery; it is not evidence that every listed function is frequently used in external projects.
import pyufunc as pf
# show all available utility functions by category
pf.show_util_func_by_category()The keyword listing groups public functions by name patterns such as get, find, list, and validate. It is a search aid for the current API and does not imply performance improvement or external usage frequency.
import pyufunc as pf
# show all available functions by keyword in func_name
pf.find_util_func_by_keyword("show")The full candidate review is maintained in docs/md_files/utility_function_pkg_review.md. The README table below lists only selected source packages for which pyufunc currently exposes optional utility wrappers. pyufunc adopts selected thin wrappers from these packages; it does not include every public function from every reviewed package.
| Package Name | Latest Version | Downloads | Latest Commit | Repository | License | Description |
|---|---|---|---|---|---|---|
| [@platformdirs] | GitHub Repo | MIT | Platform-specific user data, config, cache, and log directories. | |||
| [@filelock] | GitHub Repo | MIT | Platform-independent file locking utilities. | |||
| [@pathspec] | GitHub Repo | MPL-2.0 | Gitignore-style path pattern matching. | |||
| [@loguru] | GitHub Repo | MIT | Python logging library with a preconfigured logger API. | |||
| [@tenacity] | GitHub Repo | Apache-2.0 | Retry utilities for function calls and exception handling. | |||
| [@more-itertools] | GitHub Repo | MIT | Iterable chunking, windowing, flattening, and uniqueness helpers. | |||
| [@humanize] | GitHub Repo | MIT | Human-readable file sizes, numbers, and time deltas. | |||
| [@psutil] | GitHub Repo | BSD-3-Clause | Process and system monitoring utilities. | |||
| [@python-benedict] | GitHub Repo | MIT | Dict keypath access, flattening, unflattening, and JSON-safe conversion. | |||
| [@pyhelpers] | GitHub Repo | MIT | Data manipulation, path, pickle, text, and coordinate helpers. | |||
| [@boltons] | GitHub Repo | BSD | Nested mapping, iterable, atomic-save, slug, and time-delta utilities. | |||
| [@toolz] | GitHub Repo | BSD-3-Clause | Functional utilities for grouping, merging, sliding windows, and pipelines. | |||
| [@pyutil] | GitHub Repo | GPL-2.0-or-later | Version, math, and precondition helper functions. | |||
| [@imutils] | GitHub Repo | MIT | Image-processing convenience wrappers around OpenCV workflows. |
pyufunc is distributed under the MIT License. Third-party packages used by optional wrappers are documented in THIRD_PARTY_LICENSES.md. Optional third-party packages are not vendored and are not installed automatically by pyufunc.
pip install
pip install pyufuncimport pyufunc as pfimport pyufunc as pf
# show all available utility functions by category
pf.show_util_func_by_category()
# show all available functions by keyword in func_name
pf.find_util_func_by_keyword("show")Contributions can be submitted through pull requests on Pyufunc GitHub Repository. Proposed utilities should include a clear use case, tests, documentation, and source attribution when derived from or wrapping another package.
Small improvements or fixes are always appreciated. If you are considering larger contributions to the source code, please contact us through email:
- Xiangyong (Roy) Luo: luoxiangyong01@gmail.com
- Dr. Xuesong Simon Zhou: xzhou74@asu.edu
Writing code isn't the only way to contribute to pyufunc. You can also:
- review pull requests
- help us stay on top of new and old issues
- develop tutorials, presentations, and other educational materials
- develop graphic design for our brand assets and promotional materials
- translate website content
- help with outreach and onboard new contributors
- write grant proposals and help with other fundraising efforts
For more information about the ways you can contribute to pyufunc, visit Pyufunc GitHub. Questions can be opened as GitHub issues or added to existing relevant issues.
If you use pyufunc in your work and research, please use the following entry:
- Luo, Xiangyong and Zhou, Simon Xuesong. “Pyufunc: A Set of Utility Functions that Keep Python Sweet”. Zenodo, March 27, 2025. https://doi.org/10.5281/zenodo.15092919.
This open-source package is supported by National Science Foundation under grant no. TIP-2303748 titled, "POSE: Phase II: CONNECT: Consortium of Open-source Planning Models for Next-generation Equitable and Efficient Communities and Transportation"
Thank you to the maintainers of the packages reviewed above. If attribution or licensing information needs correction, please contact the developers or open an issue.