pylcs
super fast cpp implementation of longest common subsequence
Decision gist · record as of 2026-08-14
Yes, if you need fast string-comparison algorithms and can tolerate dormant maintenance. The package has no known vulnerabilities, permissive licensing, and adequate Windows binary support. However, verify platform availability (macOS/Linux) and Python version coverage before adopting in production; the last release was October 2023 and the original repository is no longer maintained.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a C++ compiler and pybind11 at build time; binary wheels provided for Windows Python 3.5–3.11, but non-Windows users may need to compile from source.
- Medium install friction due to compiled C++ extension requiring pybind11.
- Binary wheels available for Windows across multiple Python versions (3.5–3.11), but platform support beyond Windows is unclear from the fact sheet.
License · maintenance · safety
Apache 2.0 (permissive) — Apache 2.0 is permissive, allowing commercial and private use with minimal restrictions; no notable licensing constraints for typical adoption.
last release 2023-10-24 (1025 days) · last repo commit 2023-10-25 · 23 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 213,623 downloads/mo, #9,432 on PyPI
Alternatives
Verify before relying
pip install pylcs
import pylcs
# Longest common subsequence length
A = 'We are shannonai'
B = 'We like shannonai'
result = pylcs.lcs_sequence_length(A, B)
print(result) # 14
# Edit distance
dist = pylcs.edit_distance('aaa', 'aba')
print(dist) # 1- Whether binary wheels or source builds are available for macOS and Linux platforms.
- Current maintenance status and whether the transfer from the original repository is actively supported.
- Whether the package works with Python versions beyond 3.11.
What it is and what it does
pylcs is a C++ extension that solves three classic string-comparison problems: finding the longest common subsequence (LCS), longest common substring, and computing edit distance (Levenshtein distance) between two strings. It uses dynamic programming for speed and supports UTF-8 strings including Chinese characters. The package can compare a single string against multiple targets in batch, and includes visualization functions to colorize matching regions with ANSI escape codes.
The primary use case is rapid string similarity analysis in NLP, data deduplication, or sequence alignment tasks where performance matters. It exposes functions like `lcs_sequence_length()`, `lcs_string_length()`, and `edit_distance()` for length computation, plus `_idx` variants that return alignment indices. The package is dormant (last release October 2023, no commits since then) but carries no known security vulnerabilities.
Use it for
- Detect duplicate or near-duplicate text records in data cleaning pipelines by computing edit distance or LCS length.
- Align DNA or protein sequences in bioinformatics by finding longest common subsequences.
- Measure string similarity in fuzzy matching, autocomplete, or spell-check systems.
- Batch-compare a query string against many candidates to find the most similar match.
- Visualize string alignment differences with colored output for debugging or reporting.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need fast string-comparison algorithms and can tolerate dormant maintenance.
The package has no known vulnerabilities, permissive licensing, and adequate Windows binary support. However, verify platform availability (macOS/Linux) and Python version coverage before adopting in production; the last release was October 2023 and the original repository is no longer maintained.
Install
pylcs on PyPI
Before you install
Medium install friction due to compiled C++ extension requiring pybind11. Binary wheels available for Windows across multiple Python versions (3.5–3.11), but platform support beyond Windows is unclear from the fact sheet.
Requires a C++ compiler and pybind11 at build time; binary wheels provided for Windows Python 3.5–3.11, but non-Windows users may need to compile from source.
License in practice
Apache 2.0 is permissive, allowing commercial and private use with minimal restrictions; no notable licensing constraints for typical adoption.
Quickstart
pip install pylcs
import pylcs
# Longest common subsequence length
A = 'We are shannonai'
B = 'We like shannonai'
result = pylcs.lcs_sequence_length(A, B)
print(result) # 14
# Edit distance
dist = pylcs.edit_distance('aaa', 'aba')
print(dist) # 1
Verify before relying
- Whether binary wheels or source builds are available for macOS and Linux platforms.
- Current maintenance status and whether the transfer from the original repository is actively supported.
- Whether the package works with Python versions beyond 3.11.
Package facts
| License | Apache 2.0 permissive |
| Python support | Not specified |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packagepybind11 |
| Maintenance | Dormant 1,025 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 213,623 / month, #9,432 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: pylcs-0.1.1-cp310-cp310-win_amd64.whl; pylcs-0.1.1-cp311-cp311-win_amd64.whl; pylcs-0.1.1-cp35-cp35m-win_amd64.whl; pylcs-0.1.1-cp36-cp36m-win_amd64.whl; pylcs-0.1.1-cp37-cp37m-win_amd64.whl; pylcs-0.1.1-cp38-cp38-win_amd64.whl; pylcs-0.1.1-cp39-cp39-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “longest common subsequence”
- pylcsComputes longest common subsequence, longest common substring, and…
- rouge-scoreComputes ROUGE scores (ROUGE-N, ROUGE-L, ROUGE-Lsum) to evaluate the…
- strsimpyImplements a dozen string similarity and distance algorithms…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.
Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.
tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.
Install it if your project requires CSS tokenization or syntax manipulation.
See also strsimpy · suffix-trees · textdistance · python-Levenshtein · polyleven · cyseq · fuzzysearch · Distance · rouge-score · pyjarowinkler