Sponsors
Become a sponsor-
iPulse AI
Open Agentic Investment Research Platform. Inspect deep multi-agent market forecasts and stock picks.
-
PyUiBuilder
Build your Python GUIs like Canva using drag and drop. Export clean, editable Python code.
Listed in editorial order, grouped by use case. Click a column header to re-sort the whole list.
Press / to search. Tags open their category. Click a row for details.
Search and filter
Results
| Row number | Tags | |||||
|---|---|---|---|---|---|---|
Diffs 1 project |
||||||
| 1 | difflib Text Processing | Stdlib | 78,053 | Diffs Text Processing Text & Documents Stdlib | ||
|
(Python standard library) Helpers for computing deltas.
|
||||||
Encoding and Unicode 3 projects |
||||||
| 2 | charset-normalizer Text Processing | 1,500,273,565 | 811 | Encoding and Unicode Text Processing Text & Documents | ||
|
Universal character encoding detector, and a dependency of requests.
|
||||||
| 3 | chardet Text Processing | 160,438,167 | 2,690 | Encoding and Unicode Text Processing Text & Documents | ||
|
Python character encoding detector.
|
||||||
| 4 | ftfy Text Processing | 18,222,235 | 4,068 | Encoding and Unicode Text Processing Text & Documents | ||
|
Makes Unicode text less broken and more consistent automagically.
|
||||||
Fuzzy Matching 1 project |
||||||
| 5 | rapidfuzz Text Processing | 141,432,305 | 4,235 | Fuzzy Matching Text Processing Text & Documents | ||
|
Rapid fuzzy string matching using various string metrics, with a C++ core.
|
||||||
Internationalization 1 project |
||||||
| 6 | babel Text Processing | 121,701,726 | 1,473 | Internationalization Text Processing Text & Documents | ||
|
An internationalization library for Python.
|
||||||
Parser 6 projects |
||||||
| 7 | pygments Text Processing | 1,187,861,860 | 2,227 | Parser Text Processing Text & Documents | ||
|
A generic syntax highlighter.
|
||||||
| 8 | pyparsing Text Processing | 402,960,319 | 2,500 | Parser Text Processing Text & Documents | ||
|
A Python library for creating PEG parsers.
|
||||||
| 9 | sqlparse Text Processing | 124,508,578 | 4,024 | Parser Text Processing Text & Documents | ||
|
A non-validating SQL parser.
|
||||||
| 10 | sqlglot Text Processing | 96,456,939 | 9,842 | Parser Text Processing Text & Documents | ||
|
A no-dependency SQL parser, transpiler, optimizer, and engine.
|
||||||
| 11 | phonenumbers Text Processing | 50,629,881 | 3,780 | Parser Text Processing Text & Documents | ||
|
Parsing, formatting, storing and validating international phone numbers.
|
||||||
| 12 | parsy Text Processing | 4,104,038 | 457 | Parser Text Processing Text & Documents | ||
|
Easy, generic parser combinator library for creating parsers.
|
||||||
Transliteration and Slugs 2 projects |
||||||
| 13 | python-slugify Text Processing | 79,781,510 | 1,632 | Transliteration and Slugs Text Processing Text & Documents | ||
|
A Python slugify library that translates unicode to ASCII.
|
||||||
| 14 | unidecode Text Processing | 27,532,691 | 610 | Transliteration and Slugs Text Processing Text & Documents | ||
|
ASCII transliterations of Unicode text.
|
||||||
Unique identifiers 1 project |
||||||
| 15 | shortuuid Text Processing | 26,756,093 | 2,198 | Unique identifiers Text Processing Text & Documents | ||
|
A generator library for concise, unambiguous and URL-safe UUIDs.
|
||||||
No projects match your search.
Try a broader term, or .
Text Processing guide
Charset Normalizer
Pick Charset Normalizer to read bytes whose encoding you don't know. Requests depends on it, so it's often installed already. It doesn't try to uncover the originating encoding: it finds the one that best suits the content. Pass your bytes to from_bytes(), or a file to from_path(), and call .best() on the result for the most likely decoding.
chardet
Pick chardet when some of your bytes may not be text and you want to know what they are. Besides the encoding, every result carries a MIME type, so it can tell you a file is an image or an archive. Start with chardet.detect(), which returns the encoding with a confidence score.
ftfy
Use ftfy on text that was already decoded with the wrong encoding, like ✔ where ✔ belongs. It's a mojibake detector and fixer, not an encoding detector, so it takes a str, never bytes. Call ftfy.fix_text(), which applies every fix it can and returns the repaired text.
RapidFuzz
Pick RapidFuzz to fuzzy-match strings in bulk, or when the same words can come in a different order. Scorers like token_sort_ratio() sort the words before comparing. To match a string against a list, use the process module, whose extractOne() returns the best match.
difflib
Use difflib, in the standard library, for diffs and for small fuzzy-matching jobs that shouldn't add a dependency. unified_diff() shows just the lines that changed plus a few lines of context. get_close_matches() returns the best "good enough" matches for a word from a list.
Babel
Pick Babel to translate a Python app, or to format numbers and dates for each user's locale. It works with gettext message catalogs and the CLDR locale data. Formatting functions like format_decimal() take a locale argument. Translations go through the pybabel command, which extracts your messages, keeps a catalog per language, and compiles it for your app.
Pygments
Pick Pygments to syntax-highlight source code, for code hosting, forums, wikis, or any app that shows code. Pass your code, a lexer for its language, and a formatter to highlight() to get HTML, and generate the matching CSS with get_style_defs(). Pygments makes no guarantees on execution time, so on user input, run it in a process you stop after a short timeout.
pyparsing
Pick pyparsing to pull data out of text in a known format, such as reports or command strings: its docs say to use it on strings assumed to be well-formatted. You build the grammar in Python code, and it handles whitespace, quoted strings, and comments for you. Name the parts you want, and read them back by name from the results.
parsy
Pick parsy to write a parser for a small language as readable code. It excels at easy-to-read parsers for relatively small languages, with a minimal core and no built-in helpers for specific grammars. Its docs also say projects with demanding speed or error-message needs may have to look elsewhere. Start from primitives like regex(), combine them into larger parsers, and call .parse() on your input.
sqlparse
Pick sqlparse to split, format, or parse SQL without validating it. It makes no assumptions about a particular SQL dialect, so vendor extensions and templated SQL parse too. Its three main functions are split(), format(), and parse().
SQLGlot
Pick SQLGlot to translate SQL between dialects, or to read and rewrite a query as an expression tree. Start with sqlglot.transpile(), which takes your SQL with its read and write dialects. If you parse with parse_one(), always pass the dialect when you know it, or valid SQL may fail to parse.
phonenumbers
Pick phonenumbers to parse, validate, and format phone numbers. It's a Python port of Google's libphonenumber. Call parse() with the number and the country it's dialed from, check the result with is_valid_number(), and format it with format_number(), such as E.164.
python-slugify
Pick python-slugify to turn a title into a URL slug: slugify("C'est déjà l'été.") returns c-est-deja-l-ete.
Unidecode
Pick Unidecode to turn Unicode text into plain ASCII, for legacy code that can't handle Unicode or for machine identifiers that stay readable. unidecode('kožušček') returns kozuscek. Unidecode is GPL, and for URL slugs, python-slugify is the pick.
shortuuid
Pick shortuuid for short, non-sequential IDs that users see, like in URLs. It makes a UUID with the standard library's uuid module and translates it to base57, leaving out look-alike characters such as l, 1, I, O, and 0. Call shortuuid.uuid() for a new ID.
Declared encodings first
Before you hand bytes to Charset Normalizer or chardet, decode them with the encoding they declare. Charset Normalizer's FAQ says to use the detector as a last resort, when you're left with no clue.
Contribute
Know a project that belongs here?
Tell us what it does and why it stands out.