Ubiquerg
Ubiquerg is a Python utility package providing a collection of universally helpful, low-level functions. These functions are designed to be generic and have no external dependencies beyond standard built-in Python modules, making them suitable for use across many different applications. The library is currently at version 0.9.3, released in April 2026, with a regular release cadence.
Warnings
- gotcha The library is currently in 'Development Status :: 4 - Beta'. While generally stable, this status indicates that the API is not yet final and may undergo minor non-backward-compatible changes in future minor releases.
- gotcha The `mkabs` function (introduced in v0.8.0) was expanded to handle more cases. If you were relying on specific prior behavior for edge cases, or implicitly expecting a stricter interpretation, new versions might behave differently (e.g., resolving paths that previously failed).
- gotcha The `is_url` function (changed in v0.8.0) now explicitly allows `Path` objects as input. While this is an enhancement, if your code implicitly assumed only string inputs and performed pre-processing, this change might subtly affect error handling or validation logic in downstream components.
- gotcha The `deep_update` function (ported in v0.8.1) was brought over from `yacman`. While designed for recursive dictionary updates, users migrating from `yacman` or expecting a specific recursive merge behavior should test its exact functionality with complex nested structures to ensure it aligns with expectations, as subtle differences might exist.
Install
-
pip install ubiquerg
Imports
- expandpath
from ubiquerg.paths import expandpath
- is_filepath_like
from ubiquerg.files import is_filepath_like
- deep_update
from ubiquerg.collection import deep_update
Quickstart
from ubiquerg.paths import expandpath
from ubiquerg.files import is_filepath_like
import os
# Example 1: Expanding user and environment variables in a path
expanded_path = expandpath("~/my_project/$USER_DATA")
print(f"Expanded path: {expanded_path}")
# Example 2: Checking if a path is file-like
# Create a dummy file for demonstration
dummy_file = "test_file.txt"
with open(dummy_file, "w") as f:
f.write("Hello, ubiquerg!")
is_file_like = is_filepath_like(dummy_file)
print(f"Is '{dummy_file}' a file-like path? {is_file_like}")
# Clean up the dummy file
os.remove(dummy_file)