Skip to content

xyluo25/pyufunc

PyPI versionDownloadsCodacy Badge Generated by github-dependents-info

pyufunc

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.

Key Features

  1. 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.
  2. Categorized API surface: show_util_func_by_category() reports 253 public utility entries across the current package categories, including 94 entries in util_pkgs.
  3. Optional dependency handling: Utilities that depend on optional packages use dependency checks. Missing optional dependencies are reported instead of being installed automatically.
  4. 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.
  5. Extensibility: New utilities can be added as focused modules with tests, docstrings, source attribution, and optional dependency guards.

Evidence and Claim Boundaries

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.md lists 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.json records 35 valid function references across 5 dependent repositories, pyhelpers.json records 175 valid function references across 4 dependent repositories, and pyutil.json records 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.

Tradeoffs

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.

Existing Utility Functions Categorized by Functionality

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()

Existing Utility Functions Categorized by Keywords

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")

Selected Third-Party Utility Packages

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] PyPI version Downloads img GitHub Repo MIT Platform-specific user data, config, cache, and log directories.
[@filelock] PyPI version Downloads img GitHub Repo MIT Platform-independent file locking utilities.
[@pathspec] PyPI version Downloads img GitHub Repo MPL-2.0 Gitignore-style path pattern matching.
[@loguru] PyPI version Downloads img GitHub Repo MIT Python logging library with a preconfigured logger API.
[@tenacity] PyPI version Downloads img GitHub Repo Apache-2.0 Retry utilities for function calls and exception handling.
[@more-itertools] PyPI version Downloads img GitHub Repo MIT Iterable chunking, windowing, flattening, and uniqueness helpers.
[@humanize] PyPI version Downloads img GitHub Repo MIT Human-readable file sizes, numbers, and time deltas.
[@psutil] PyPI version Downloads img GitHub Repo BSD-3-Clause Process and system monitoring utilities.
[@python-benedict] PyPI version Downloads img GitHub Repo MIT Dict keypath access, flattening, unflattening, and JSON-safe conversion.
[@pyhelpers] PyPI version Downloads img GitHub Repo MIT Data manipulation, path, pickle, text, and coordinate helpers.
[@boltons] PyPI version Downloads img GitHub Repo BSD Nested mapping, iterable, atomic-save, slug, and time-delta utilities.
[@toolz] PyPI version Downloads img GitHub Repo BSD-3-Clause Functional utilities for grouping, merging, sliding windows, and pipelines.
[@pyutil] PyPI version Downloads img GitHub Repo GPL-2.0-or-later Version, math, and precondition helper functions.
[@imutils] PyPI version Downloads img GitHub Repo MIT Image-processing convenience wrappers around OpenCV workflows.

License and Third-Party Notices

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.

Quick Tutorial

Install pyufunc

pip install

pip install pyufunc

Import package

import pyufunc as pf

General use (show existing utility functions)

import 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")

Community and Support

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:

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.

How to Cite

If you use pyufunc in your work and research, please use the following entry:

ACKNOWLEDGMENT

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.

Packages

 
 
 

Contributors

Languages