RapidFuzz compares strings with many similarity scorers, including Levenshtein-based ratios. It targets high throughput matching in Python with C++ acceleration.
Overview
RapidFuzz implements fuzzy string matching for pairs and lists of strings, drawing on metrics popularized by FuzzyWuzzy while extending the set to Hamming, Jaro-Winkler, and other distances documented in the library. Core logic is implemented in C++ with Python bindings and optional pure-Python fallbacks when compiled extensions are unavailable.
Scorers live under fuzz and distance modules; the process module supports efficient comparison of a query string against many candidates, which benchmarks show is faster than calling scorers in a tight Python loop. From major version 3 onward, strings are not preprocessed by default, so case and punctuation affect scores unless callers normalize input.
Wheels ship for macOS, Linux x86_64, Windows, and several ARM Linux variants; conda packages are also published. The API is largely usable as a drop-in replacement for fuzzywuzzy with documented differences. Licensing is MIT, distinct from GPL-licensed older fuzzywuzzy lineage the project references.
Key features
- Levenshtein and partial ratio scorers
- Token sort, set, and weighted ratios
- Hamming and Jaro-Winkler metrics
- process.cdist batch matching
- C++ accelerated implementations
- Pure Python algorithm fallbacks
- FuzzyWuzzy-compatible interfaces
- MIT licensed distribution
Use cases
- Record linkage and deduplication
- Autocomplete and fuzzy search ranking
- Entity resolution in data pipelines
- Migrating from FuzzyWuzzy with speedups