RapidFuzz is a high-performance Python library for rapid fuzzy string matching, utilizing various string metrics. The current version is 3.14.3, released on March 28, 2026. It is actively maintained with regular updates to improve performance and functionality.
pip install rapidfuzzVerified import paths — ran on the pinned version, not inferred.
A simple example demonstrating how to use RapidFuzz to compare two strings and calculate their similarity ratio.
Use the 'processor' parameter with 'utils.default_process' to enable preprocessing.
Install 'numpy' using 'pip install numpy'.
Install the 'Build Tools for Visual Studio' (for Windows) and ensure the 'Desktop development with C++' workload is selected. On Linux/macOS, ensure development tools like `build-essential` (Debian/Ubuntu) or `Xcode Command Line Tools` (macOS) are installed.
Install the library using pip: `pip install rapidfuzz`
Import `ratio` from `rapidfuzz.fuzz` or import `fuzz` and access it as `fuzz.ratio`:
```python
from rapidfuzz.fuzz import ratio
ratio("apple", "appel")
# OR
from rapidfuzz import fuzz
fuzz.ratio("apple", "appel")
```Import `extract` from `rapidfuzz.process`:
```python
from rapidfuzz import process
process.extract("apple", ["orange", "apple pie", "banana"])
```