python-utils
Python Utils is a module with some convenient utilities not included with the standard Python install
Decision gist · record as of 2026-08-14
Yes. Low install friction, no heavy dependencies, active maintenance, permissive license, and zero known vulnerabilities make it a safe choice. The lazy-loading design and strict typing add real value for codebases that care about both performance and correctness. Install it if you find yourself repeatedly writing converters, time formatters, or async batching logic.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction: single runtime dependency (typing-extensions, lazily imported), pure Python wheel, and active maintenance with a recent release 43 days ago.
License · maintenance · safety
BSD-3-Clause (permissive) — BSD-3-Clause permissive license allows use in commercial and proprietary projects with minimal restrictions.
last release 2026-07-02 (43 days) · last repo commit 2026-07-02 · 98 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 20,241,585 downloads/mo, #1,042 on PyPI
Alternatives
Verify before relying
pip install python-utils
import python_utils
# Extract a number from a messy string
port = python_utils.to_int('listening on port=8080', regexp=True) # 8080
# Remap a value between ranges
db_level = python_utils.remap(46.0, 0.0, 100.0, -80.0, 10.0) # -38.6- Whether lazy loading via PEP 562 truly avoids importing typing_extensions until first use of affected helpers.
- Performance characteristics compared to hand-written equivalents or other utility libraries.
- Stability guarantees and backward-compatibility policy across major versions.
What it is and what it does
Python Utils is a collection of small, production-tested utility functions and classes that package common Python patterns you'd otherwise rewrite repeatedly. It covers converters (extracting numbers and floats from strings, scaling bytes, remapping values), smart containers (self-casting dicts, duplicate-proof lists, sliceable deques), async helpers (acount, abatcher for async iteration), time utilities (formatting durations, timeout generators), and decorators (listify, sample). The package is fully typed, passes strict mypy and basedpyright checks, and ships with 100% test coverage.
Designed for minimal overhead, it uses lazy imports so importing the package itself pulls in nothing until you actually call a helper. Its single runtime dependency is typing-extensions, and it requires Python 3.10 or later. The package has powered production code for years and is used by libraries like Django Utils and progressbar2.
Use it for
- Extract integers or floats from messy, unstructured strings without manual regex work.
- Batch async streams by size or time interval without stalling slow producers.
- Remap numeric values between ranges with optional Decimal precision for audio/video workflows.
- Format human-readable time deltas and timestamps uniformly across different input types.
- Build self-casting dicts or duplicate-proof lists to reduce validation boilerplate in data pipelines.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Low install friction, no heavy dependencies, active maintenance, permissive license, and zero known vulnerabilities make it a safe choice. The lazy-loading design and strict typing add real value for codebases that care about both performance and correctness. Install it if you find yourself repeatedly writing converters, time formatters, or async batching logic.
Install
python-utils on PyPI
Before you install
Low friction: single runtime dependency (typing-extensions, lazily imported), pure Python wheel, and active maintenance with a recent release 43 days ago.
Requires Python 3.10 or later.
License in practice
BSD-3-Clause permissive license allows use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install python-utils
import python_utils
# Extract a number from a messy string
port = python_utils.to_int('listening on port=8080', regexp=True) # 8080
# Remap a value between ranges
db_level = python_utils.remap(46.0, 0.0, 100.0, -80.0, 10.0) # -38.6
Verify before relying
- Whether lazy loading via PEP 562 truly avoids importing typing_extensions until first use of affected helpers.
- Performance characteristics compared to hand-written equivalents or other utility libraries.
- Stability guarantees and backward-compatibility policy across major versions.
Package facts
| License | BSD-3-Clause permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagetyping-extensions |
| Maintenance | Actively maintained 43 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 20,241,585 / month, #1,042 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTyping :: Typed |
Evidence: python_utils-4.0.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “number and string converters”
- python-utilsA collection of fully-typed utility functions and classes for common…
- python-baseconvConverts integers to and from strings in arbitrary bases (binary,…
- base36Converts integers to and from base36 representation, a compact…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also asyncstdlib · banal · parameter-decorators · asyncstdlib-fw · lamin_utils · essentials · big · sensai-utils · utils · etils