{"categories":[{"label":"Text Processing","url":"https://skillfed.io/packages/category/text-processing/2"}],"enrichment":{"capability":"Searches for multiple substrings in text or bytes using the Aho-Corasick algorithm, returning match positions and matched patterns with configurable overlap and matching strategies.","skillfed_tags":["string-matching","performance-critical","rust-backed"],"use_cases":["Scanning log files or documents for multiple keywords or error codes in a single pass.","Filtering or redacting sensitive terms from text or data streams.","Building search indices or content-matching systems that need to detect many patterns efficiently.","Detecting multiple signatures or indicators in binary or text data.","Tokenizing or lexing source code by matching multiple reserved words and operators simultaneously."],"what_it_does":"ahocorasick_rs is a Python wrapper around the Rust aho-corasick library that finds all occurrences of multiple patterns in a single pass through a text or byte string. It implements the Aho-Corasick automaton algorithm, which is significantly faster than searching for patterns sequentially, especially when you have many patterns or large haystacks. The package supports both string and bytes searching, with configurable matching strategies (Standard, LeftmostFirst, LeftmostLongest) and optional overlapping match detection.\n\nThe library exposes two main classes: AhoCorasick for string patterns and BytesAhoCorasick for byte patterns. You can tune performance by choosing between different underlying automaton implementations (NoncontiguousNFA, ContiguousNFA, DFA) and control memory usage through pattern caching. It has one runtime dependency (typing-extensions) and requires Python 3.10 or later.","worth_installing":"Yes, if you need to search for multiple patterns in text or bytes. The Aho-Corasick algorithm is significantly faster than sequential pattern matching. Install friction is moderate (compiled wheels) but well-supported across platforms. No vulnerabilities reported, actively maintained, and permissive license. Not necessary if you only search for single patterns or have very few patterns where overhead isn't a concern."},"id":"ahocorasick-rs","links":{"html":"https://skillfed.io/packages/ahocorasick-rs","md":"https://skillfed.io/packages/ahocorasick-rs.md","pypi":"https://pypi.org/project/ahocorasick-rs/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-10-08","license_spdx":null,"license_treatment":"permissive","name":"ahocorasick-rs","python_support":"supports_current","summary":"Search for multiple substrings at the same time, and quickly too"},"popularity":{"monthly_downloads":534741,"position":6131,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.0.3"}
