Pre-release
This release is a pre-release and may not be stable for production use.
UtilsX
A collection of useful constants and generic functions for Python.
Available utilities:
- 🪨 Constants:
MINUTES_IN_HOUR,GRAMS_IN_LBS... - 📋 Dictionary operations: filtering, sorting, summation...
- 🧮 Math operations: safe division, scaling, normalization...
- 🗄️ Collections utils: get duplicates, check all elements are equal...
- ⛔ Common exceptions: raise if any negative values,
KeyErrorwith fix suggestions... - 📝 Text: add suffix with a delimiter...
- 🇹 Type variables for you to use in custom generic functions.
Great developer experience:
- 🐍 Installable via
pip - 🤝 Supports all Python versions >= 3.10
- ⛓️ Compatible with type checkers (
mypy, ...) - 🪶 Lightweight: has no dependencies
UtilsX aims to provide convenient machinery for generic operations, so you can focus on the domain logic of your projects.
Getting started
Installation
UtilsX is available as utilsx on PyPI:
# With uv's pip interface
uv pip install utilsx
# With uv's project management interface
uv add utilsx
# With plain pip
pip install utilsx
Usage
Import components of UtilsX into your Python files and use just like any other library:
from utilsx import safe_divide
profit = 12
capital = 0
roe = safe_divide(profit, capital)
print(f"Return on equity: {roe:.0%}")
# Output: Return on equity: 0%
Metadata
Release files for utilsx 0.0.0a5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| utilsx-0.0.0a5.tar.gz | 75.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| utilsx-0.0.0a5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 90.4 kB
Release files / utilsx-0.0.0a5.tar.gz
| Download URL | utilsx-0.0.0a5.tar.gz |
|---|---|
| Size | 75.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
feb107eb80872e2d326ba4f5ad786a29377708b4525b66fe28c1101447c47aa7
|
|
BLAKE2b-256 checksum How to use checksums |
358ab6d90c37daf72cd91feaaae8e535ca2406659c99031e37677d64c64ce3fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / utilsx-0.0.0a5-py3-none-any.whl
| Download URL | utilsx-0.0.0a5-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1e7d924f4e1e80113f4b8f1ddbfec3ea1cfde245fe58af7d35f1ac69409944a8
|
|
BLAKE2b-256 checksum How to use checksums |
24f55e0d3c61a03bafd67a2915834adade4a1ba977f0f4f02862c9675a010922
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|