Feu - Python Package and Version Manager

0.6.2 · active · verified Mon Apr 13

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

Install

Imports

Quickstart

This example demonstrates how to check for package availability and retrieve its version using `feu`. It also shows how to import `find_closest_version` for more advanced version resolution, although the specific implementation details for finding the 'closest' version are internal to the library or require a configured registry.

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

view raw JSON →