Fuzzywuzzy: Python Library for Fuzzy String Matching
This repository profile is provided by osrepos.com, an open source repository discovery platform.

Summary
Fuzzywuzzy is a popular Python library designed for fuzzy string matching, enabling efficient comparison and similarity scoring between text strings. It leverages Levenshtein distance to help with tasks like data cleaning and record linkage. While widely used, this project has been superseded by TheFuzz, which continues its development under a new name.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
Fuzzywuzzy is a powerful Python library for fuzzy string matching, based on Levenshtein distance. It provides a simple API to compare strings and determine their similarity, making it invaluable for tasks requiring flexible text comparison. Important Note: This project has been renamed and moved to TheFuzz, which is the actively maintained successor. Users are encouraged to migrate to TheFuzz for ongoing development and support.
Installation
To install Fuzzywuzzy, you can use pip. However, it is highly recommended to install thefuzz instead, as fuzzywuzzy is no longer actively maintained and thefuzz offers the same functionality with continued support.
pip install fuzzywuzzy[speedup]
# Recommended: Install thefuzz instead
# pip install thefuzz[speedup]
The [speedup] option installs python-Levenshtein, which significantly improves performance for string comparisons.
Examples
Fuzzywuzzy offers various methods for comparing strings, including simple ratio, partial ratio, token sort ratio, and token set ratio.
from fuzzywuzzy import fuzz
from fuzzywuzzy import process
# Simple Ratio
print(fuzz.ratio("this is a test", "this is a test!")) # Output: 97
# Partial Ratio
print(fuzz.partial_ratio("this is a test", "this is a test!")) # Output: 100
# Token Sort Ratio
print(fuzz.token_sort_ratio("fuzzy wuzzy was a bear", "wuzzy fuzzy was a bear")) # Output: 100
# Token Set Ratio
print(fuzz.token_set_ratio("fuzzy was a bear", "fuzzy fuzzy was a bear")) # Output: 100
# Extracting best matches from a list
choices = ["apple pie", "grape juice", "apple sauce", "orange juice"]
print(process.extract("apple", choices, limit=2)) # Output: [('apple pie', 90), ('apple sauce', 90)]
print(process.extractOne("apple", choices)) # Output: ('apple pie', 90)
Why Use Fuzzy String Matching?
Fuzzy string matching is crucial in many applications where exact string matches are not sufficient. It helps in:
- Data Cleaning: Identifying and merging duplicate records with slight variations or typos.
- Search Functionality: Providing more robust search results by matching queries even with minor spelling errors.
- Natural Language Processing (NLP): Comparing text for similarity in tasks like plagiarism detection or text deduplication.
- Record Linkage: Connecting records across different datasets that may have inconsistent naming conventions.
Fuzzywuzzy, and its successor TheFuzz, provide a straightforward and efficient way to implement these capabilities in Python.
Links
Related repositories
Similar repositories that may be relevant next.

DA-Forge: Streamlining Declarative Agent Creation for Copilot Notebooks
September 12, 2026
DA-Forge is a Python-based tool by Microsoft designed to automate the creation and deployment of Declarative Agents for Copilot Notebooks. It significantly reduces the manual effort and time required to set up AI assistants with specific grounding references, transforming an 85-minute process into just a few minutes. This tool is essential for developers and researchers working with Copilot Notebooks and Declarative Agents.

Curie: Automated and Rigorous Scientific Experimentation with AI Agents
September 12, 2026
Curie is an innovative AI-agent framework designed for automating rigorous scientific experimentation. It streamlines the entire research lifecycle, from hypothesis formulation to result interpretation, ensuring precision, reliability, and reproducibility. This empowers scientists to accelerate their research processes significantly.

Tau: A Minimalist Python Coding Agent for Your Terminal
September 8, 2026
Tau is a Python port of Pi's minimalist coding agent, designed to live in your terminal. It allows users to make requests like "explain this repo" or "add tests," and it can read files, edit code, and run commands. Beyond its utility, Tau also serves as a teaching project, demonstrating how coding agents are built with a small, readable codebase.

Awesome Harness Engineering: Building Reliable AI Agent Systems
September 7, 2026
Awesome Harness Engineering is a comprehensive curated list dedicated to the discipline of designing robust AI agent harnesses. It offers a wealth of resources, patterns, and templates essential for building reliable AI agent systems. Developers can explore tools, best practices, and foundational concepts across various critical areas of agent development.
Source repository
Open the original repository on GitHub.
15 counted GitHub visits