Feu - Python Package and Version Manager
Feu (French word for "fire" 🔥) is a lightweight Python library designed to help manage Python packages and their versions across different Python environments. It offers key features such as checking package availability, performing version-aware installations, and smart version resolution. Currently at version 0.6.2, it is in active development with no guarantees of API stability before a 1.0.0 release.
Warnings
- breaking The API of 'feu' is not guaranteed to be stable and is likely to change significantly before a stable 1.0.0 release. Upgrading to newer pre-1.0.0 versions may introduce breaking changes to existing code.
- gotcha As a library in early development (pre-1.0.0), 'feu' may have rapidly evolving functionality, incomplete features, or undocumented behaviors. Relying on current features without careful testing might lead to issues in future updates.
Install
-
pip install feu
Imports
- is_package_available
from feu import is_package_available
- get_package_version
from feu import get_package_version
- find_closest_version
from feu.package import find_closest_version
Quickstart
from feu import is_package_available, get_package_version
from feu.package import find_closest_version
# Check if a package is available
if is_package_available("numpy"):
version = get_package_version("numpy")
print(f"NumPy is installed with version: {version}")
else:
print("NumPy is not installed.")
# Example of finding a compatible version (logic might vary for actual use)
# This demonstrates the import, a real use case would involve a registry or specific version constraints.
try:
# Note: 'find_closest_version' would typically rely on a pre-defined registry or extensive lookup logic
# For this quickstart, it's shown as an imported function, assuming it has internal logic.
closest_np_version = find_closest_version("numpy", "1.20")
print(f"Closest NumPy version to 1.20 found: {closest_np_version}")
except Exception as e:
print(f"Could not find closest version for numpy 1.20: {e}")