feu 🔥
Overview
feu (French word for "fire" 🔥) is a lightweight Python library designed to help manage Python
packages and their versions across different Python environments.
Key Features
- ✅ Check package availability: Verify if packages and modules are installed
- 🔄 Version-aware installation: Install packages with automatic version compatibility checks
- 🎯 Smart version resolution: Find the closest valid package version for your target
environment (Python version, free-threadedness, OS, and CPU architecture). A version can be an
exact version (
2.4.0), a wildcard (2.4.*) or empty (the latest) - 📋 Package registry: Built-in compatibility information for popular packages (numpy, pandas, polars, torch, pydantic, etc.), which can be extended with your own constraints
- 🔍 PyPI-backed discovery: Discover version compatibility from the wheels published on PyPI, including for packages that aren't in the built-in registry
- 🔖 Version utilities: Compare, filter and sort versions, fetch the versions published on PyPI,
and read dependency bounds from
pyproject.toml - 🌿 Git and GitHub utilities: Get the tags of a local repository, and fetch and sort repository metadata from the GitHub API
- 🖥️ CLI tools: Command-line interface (
feu) to install a package, find the closest valid version, check if a version is valid, list the versions to test and follow the trend ofpytest-benchmarkresults (pip install 'feu[cli]') - 📈 Benchmark trend: Compare the latest
pytest-benchmarkrun with the median of the previous ones, as a Markdown report with GitHub Actions warnings (feu.benchmark) - 🧪 Testing marks:
pytestmarks to skip tests when an optional library is (not) available (feu.testing) - 🧩 Extensible: Register your own installers (
pipanduvare built in), dependency resolvers and compatibility constraints - 🪶 Lightweight: Minimal dependencies (only
packagingrequired for core functionality)
Quick Example
The examples are doctests: they are run by the test suite, so they cannot drift from the code. The examples that need the network are marked as skipped.
>>> from feu import is_package_available
>>> from feu.compat import Target, find_closest_version
>>> is_package_available("packaging")
True
>>> # The closest valid version for a target (Python 3.9 on Linux x86_64)
>>> target = Target(python_version="3.9", os="linux", arch="x86_64")
>>> find_closest_version("numpy", "2.3.0", target)
'2.0.2'
>>> # A version is a request: an exact version, a wildcard or "" for the latest
>>> find_closest_version("numpy", "1.*", target) # doctest: +SKIP
'1.26.4'
>>> # A target without a platform means "any platform"
>>> find_closest_version("numpy", "2.3.0", Target(python_version="3.9"))
'2.0.2'
The same checks are available from the command line (pip install 'feu[cli]'). The standard
output holds only the answer and the exit status carries the result (0 ok, 1 negative answer,
2 usage error):
feu find-closest-version --pkg-name=numpy --pkg-version=2.0.2 --python-version=3.10
feu check-valid-version --pkg-name=numpy --pkg-version=2.0.2 --python-version=3.10
feu install --pkg-name=numpy --pkg-version=2.0.2
python -m feu ... is equivalent. The commands are install, find-closest-version,
check-valid-version, package-versions and benchmark-trend.
More examples
Add your own compatibility constraints, without touching the default registry:
>>> from feu.compat import CompatRegistry, VersionRange
>>> registry = CompatRegistry()
>>> registry.register("my_package", Target("3.11"), ranges=[VersionRange("1.2.0", "2.0.0")])
>>> find_closest_version("my_package", "3.0.0", Target("3.11"), registry=registry)
'2.0.0'
See the requirements that are installed for a package, here an old pandas:
>>> from feu import PackageSpec
>>> from feu.install.resolver import resolve
>>> resolve(PackageSpec("pandas", "2.1.1"))
[<Requirement('pandas==2.1.1')>, <Requirement('numpy<2.0.0')>]
Sort and filter versions:
>>> from feu.version import filter_stable_versions, latest_minor_versions
>>> latest_minor_versions(filter_stable_versions(["1.9.0", "1.9.1", "1.10.0", "2.0.0rc1"]))
['1.9.1', '1.10.0']
Install a package, or every compatible version of it:
from feu import InstallerSpec, PackageSpec, install_package_closest_version, resolve_target
from feu.install import install_all_versions
install_package_closest_version(InstallerSpec("uv"), PackageSpec("numpy", "2.*"))
result = install_all_versions(InstallerSpec("pip"), "numpy", resolve_target())
Report the trend of the pytest-benchmark results:
pytest --benchmark-only --benchmark-save=run --benchmark-storage=.benchmarks
feu benchmark-trend .benchmarks --days 30 --fail-on-regression
The usage guide has examples of every feature.
The shipped compatibility data covers bokeh, click, duckdb, jax, matplotlib, numpy,
pandas, polars, pyarrow, pydantic, requests, safetensors, scikit-learn, scipy,
torch, xarray and xy, for Python 3.9 to 3.15 on Linux, macOS and Windows (x86_64 and
arm64).
Main API
| Name | What it does |
|---|---|
is_package_available, is_module_available |
Check if a package is installed, or a module can be imported (cached) |
get_package_version, compare_version |
Read the installed version of a package, and compare it to a version |
Target, resolve_target |
The environment (Python version, free-threaded flag, OS, architecture) |
is_valid_version, find_closest_version |
Validate a version request for a target, or find the closest valid version |
install_package, install_package_closest_version |
Install a package as written, or at the closest valid version for the target |
PackageSpec, InstallerSpec |
Describe the package (name, version request, extras) and the installer |
All of them can be imported from feu. The other modules are:
| Module | What it does | Extra |
|---|---|---|
feu.compat |
Compatibility registry, shipped data, discovery from PyPI | requests (PyPI) |
feu.install |
Installers, dependency resolvers, installation of every version | requests (PyPI) |
feu.version |
Compare, filter and sort versions, PyPI metadata, pyproject.toml bounds |
requests (PyPI) |
feu.imports |
Optional dependencies: availability checks and MissingPackageError |
|
feu.utils |
Shared helpers: PackageSpec, Registry, JSON files, HTTP, commands |
requests (HTTP) |
feu.benchmark |
Trend and regressions of pytest-benchmark results |
|
feu.github |
Metadata of GitHub repositories | requests |
feu.local_git |
Tags of the local git repository | git |
feu.testing |
pytest marks for the optional libraries |
none (needs pytest) |
Version requests
Wherever a function takes the version of a package to install or to validate, it accepts a
version request: an exact version (2.4.0), a wildcard (2.4.*, 2.*) or an empty string (the
latest version). A wildcard is matched against the versions published on PyPI when it is resolved,
so it needs network access and the requests extra.
Why feu?
Managing Python package versions across different Python versions can be challenging. Different
Python versions support different package versions, and manually tracking compatibility can be
error-prone. feu solves this by:
- Automating version selection: Automatically finds compatible package versions for your Python environment
- Preventing installation failures: Validates versions before installation to avoid runtime errors
- Simplifying multi-version support: Makes it easy to support multiple Python versions in your projects
- Providing graceful fallbacks: Check package availability and provide alternatives when packages aren't installed
Documentation
- 📚 Full Documentation
- 🚀 Get Started Guide
- 📖 Usage Examples
- 🧭 Design: the properties of
feu, the design choices and their trade-offs - 🧱 Architecture: layers, how to add a package, an installer or a resolver
- 🖥️ CLI Reference
- 📚 API Reference
Quick Links
Installation
feu requires Python 3.11 or newer. We highly recommend installing it in a
virtual environment.
feu can be installed from pip using the following command:
pip install feu
To make the package as slim as possible, only the minimal packages required to use feu are
installed. To include all the dependencies, you can use the following command:
pip install 'feu[all]'
Please check the get started page to see how to
install only some specific dependencies (feu[cli], feu[git], feu[requests], feu[rich]) or
other alternatives to install the library. The following
is the corresponding feu versions and supported dependencies.
feu |
packaging |
python |
click* |
gitpython* |
requests* |
rich* |
|---|---|---|---|---|---|---|
main |
>=22.0,<27.0 |
>=3.11 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
>=2.30,<3.0 |
>=14.0.0,<16.0 |
0.9.0 |
>=22.0,<27.0 |
>=3.11 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
>=2.30,<3.0 |
>=14.0.0,<16.0 |
0.8.4 |
>=21.0,<27.0 |
>=3.10 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
>=2.30,<3.0 |
>=14.0.0,<16.0 |
0.8.3 |
>=21.0,<27.0 |
>=3.10 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
>=2.30,<3.0 |
>=14.0.0,<16.0 |
0.8.2 |
>=21.0,<27.0 |
>=3.10 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
>=2.30,<3.0 |
>=14.0.0,<16.0 |
0.8.1 |
>=21.0,<27.0 |
>=3.10 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
>=2.30,<3.0 |
>=14.0.0,<16.0 |
0.8.0 |
>=21.0,<27.0 |
>=3.10 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
>=2.30,<3.0 |
>=14.0.0,<16.0 |
0.7.3 |
>=21.0,<27.0 |
>=3.10 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
>=2.30,<3.0 |
|
0.7.2 |
>=21.0,<27.0 |
>=3.10 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
>=2.30,<3.0 |
|
0.7.1 |
>=21.0,<27.0 |
>=3.10 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
>=2.30,<3.0 |
|
0.7.0 |
>=21.0,<27.0 |
>=3.10 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
>=2.30,<3.0 |
|
0.6.2 |
>=21.0,<27.0 |
>=3.10 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
>=2.30,<3.0 |
|
0.6.1 |
>=21.0,<26.0 |
>=3.10 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
>=2.30,<3.0 |
|
0.6.0 |
>=21.0,<26.0 |
>=3.10 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
>=2.30,<3.0 |
|
0.5.0 |
>=21.0,<26.0 |
>=3.10,<3.15 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
>=2.30,<3.0 |
* indicates an optional dependency
The requests extra also installs urllib3>=2.0,<3.0.
older versions
feu |
packaging |
python |
click* |
gitpython* |
fire* |
requests* |
|---|---|---|---|---|---|---|
0.4.2 |
>=21.0,<26.0 |
>=3.10,<3.15 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
>=2.30,<3.0 |
|
0.4.1 |
>=21.0,<26.0 |
>=3.10,<3.15 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
>=2.30,<3.0 |
|
0.4.0 |
>=21.0,<26.0 |
>=3.9,<3.14 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
>=2.30,<3.0 |
|
0.3.5 |
>=21.0,<26.0 |
>=3.9,<3.14 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
||
0.3.4 |
>=21.0,<26.0 |
>=3.9,<3.14 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
||
0.3.3 |
>=21.0,<26.0 |
>=3.9,<3.14 |
>=8.1,<9.0 |
>=3.1.41,<4.0 |
||
0.3.2 |
>=21.0,<25.0 |
>=3.9,<3.14 |
>=8.1,<9.0 |
|||
0.3.1 |
>=21.0,<25.0 |
>=3.9,<3.14 |
>=8.1,<9.0 |
|||
0.3.0 |
>=21.0,<25.0 |
>=3.9,<3.14 |
>=8.1,<9.0 |
|||
0.2.4 |
>=21.0,<25.0 |
>=3.9,<3.13 |
>=8.1,<9.0 |
|||
0.2.3 |
>=21.0,<25.0 |
>=3.9,<3.13 |
>=8.1,<9.0 |
|||
0.2.2 |
>=21.0,<25.0 |
>=3.9,<3.13 |
>=8.1,<9.0 |
|||
0.2.1 |
>=21.0,<25.0 |
>=3.9,<3.13 |
>=8.1,<9.0 |
|||
0.2.0 |
>=21.0,<25.0 |
>=3.9,<3.13 |
>=8.1,<9.0 |
|||
0.1.1 |
>=21.0,<25.0 |
>=3.9,<3.13 |
>=0.6.0,<1.0 |
|||
0.1.0 |
>=21.0,<25.0 |
>=3.9,<3.13 |
>=0.6.0,<1.0 |
|||
0.0.7 |
>=21.0,<25.0 |
>=3.9,<3.13 |
||||
0.0.6 |
>=21.0,<25.0 |
>=3.9,<3.13 |
||||
0.0.5 |
>=21.0,<25.0 |
>=3.9,<3.13 |
||||
0.0.4 |
>=21.0,<25.0 |
>=3.9,<3.13 |
||||
0.0.3 |
>=21.0,<25.0 |
>=3.9,<3.13 |
||||
0.0.2 |
>=22.0,<24.0 |
>=3.9,<3.13 |
||||
0.0.1 |
>=22.0,<23.3 |
>=3.9,<3.13 |
Contributing
Please check the instructions in CONTRIBUTING.md.
Suggestions and Communication
Everyone is welcome to contribute to the community. If you have any questions or suggestions, you can submit Github Issues. We will reply to you as soon as possible. Thank you very much.
API stability
⚠️ While feu is in development stage, no API is guaranteed to be stable from one release to
the next. In fact, it is very likely that the API will change multiple times before a stable 1.0.0
release. In practice, this means that upgrading feu to a new version will possibly break any code
that was using the old version of feu.
License
feu is licensed under BSD 3-Clause "New" or "Revised" license available in LICENSE
file.
Metadata
Release files for feu 0.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| feu-0.9.1.tar.gz | 155.1 kB | With provenance | Details for feu-0.9.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| feu-0.9.1-py3-none-any.whl | Python 3 | none | any | Details for feu-0.9.1-py3-none-any.whl |
Total release size: 262.3 kB
Release files / feu-0.9.1.tar.gz
| Download URL | feu-0.9.1.tar.gz |
|---|---|
| Size | 155.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6ae6a3332e2e03edb0b3128111c55904132d5e92850929c43444e23b07aefda
|
|
BLAKE2b-256 checksum How to use checksums |
6791bac1877512e875cfa597448f23fbb4d5d4a2aa45879ef99ef6f1871c23fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logRelease files / feu-0.9.1-py3-none-any.whl
| Download URL | feu-0.9.1-py3-none-any.whl |
|---|---|
| Size | 107.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7e85e354bd75ea242a0612cc6b5bb27fad3675591bf2e93cfa6bb76ddb40aab
|
|
BLAKE2b-256 checksum How to use checksums |
760a9239c7063ee19dd6e29a786d4ab2425f66e242ededed400637f5a1292c45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logSecurity for feu 0.9.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for feu-0.9.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.