Text & Documents

Listed by section, in editorial order. 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

Text Processing 15 projects

Mojibake like "café" is ftfy's to fix, and charset-normalizer detects encodings. For fuzzy matching, add RapidFuzz to your Python text processing libraries.

Universal character encoding detector, and a dependency of requests.
Python character encoding detector.
chardet/github.com/chardet/chardet /2,680 stars /
Makes Unicode text less broken and more consistent automagically.
rspeer/github.com/rspeer/python-ftfy /4,067 stars /
Rapid fuzzy string matching using various string metrics, with a C++ core.
rapidfuzz/github.com/rapidfuzz/RapidFuzz /4,186 stars /
(Python standard library) Helpers for computing deltas.
An implementation of figlet written in Python.
pwaller/github.com/pwaller/pyfiglet /1,593 stars /
An internationalization library for Python.
python-babel/github.com/python-babel/babel /1,471 stars /
A generic syntax highlighter.
pygments/github.com/pygments/pygments /2,219 stars /
A Python library for creating PEG parsers.
pyparsing/github.com/pyparsing/pyparsing /2,497 stars /
A non-validating SQL parser.
Parsing, formatting, storing and validating international phone numbers.
Easy, generic parser combinator library for creating parsers.
A Python slugify library that translates unicode to ASCII.
un33k/github.com/un33k/python-slugify /1,628 stars /
ASCII transliterations of Unicode text.
avian2/github.com/avian2/unidecode /611 stars /
A generator library for concise, unambiguous and URL-safe UUIDs.

HTML Manipulation 5 projects

Scraped HTML, however broken, parses in Beautiful Soup on lxml's parser. JustHTML packs a sanitizer into a Python HTML library and runs it by default.

A very fast, easy-to-use and versatile library for handling HTML and XML.
lxml/github.com/lxml/lxml /3,071 stars /
Providing Pythonic idioms for iterating, searching, and modifying HTML or XML.
Makes working with XML feel like working with JSON.
Safely adds untrusted strings to HTML/XML markup.
pallets/github.com/pallets/markupsafe /701 stars /
A pure Python HTML5 parser that sanitizes untrusted HTML by default.

File Format Processing 19 projects

PDFs you merge, split, or encrypt need only pypdf. Which Python file format library you need beyond that depends on whether you read a file or create it.

Parsing and analyzing ELF files and DWARF debugging information.
eliben/github.com/eliben/pyelftools /2,290 stars /
A module for tabular datasets in XLS, CSV, JSON, YAML.
jazzband/github.com/jazzband/tablib /4,759 stars /
Python tool for converting files and office documents to Markdown.
microsoft/github.com/microsoft/markitdown /192,898 stars /
A thin wrapper for pandoc, the universal document converter.
Library for converting documents into structured data.
A library for reading and writing Excel 2010 xlsx/xlsm/xltx/xltm files.
A Python module for creating Excel .xlsx files.
jmcnamara/github.com/jmcnamara/XlsxWriter /3,990 stars /
Creates, reads, and updates Microsoft Word (.docx) files.
Python library for creating and updating PowerPoint (.pptx) files.
scanny/github.com/scanny/python-pptx /3,570 stars /
A library capable of splitting, merging, cropping, and transforming PDF pages.
py-pdf/github.com/py-pdf/pypdf /10,279 stars /
A fast MuPDF-based library for extracting, rendering, and editing PDFs and other documents.
pymupdf/github.com/pymupdf/PyMuPDF /11,015 stars /
An open-source library for generating PDFs and graphics.
A community-maintained fork of PDFMiner for extracting information from PDF documents.
pdfminer/github.com/pdfminer/pdfminer.six /7,047 stars /
A visual rendering engine for HTML and CSS that can export to PDF.
Kozea/github.com/Kozea/WeasyPrint /9,740 stars /
Markdown parser with 100% CommonMark support, extensions, and syntax plugins.
A Python implementation of John Gruber's Markdown.
A fast yet powerful Python Markdown parser with renderers and plugins.
lepture/github.com/lepture/mistune /3,080 stars /
(Python standard library) Parse TOML files.
A full-featured YAML framework for Python.
yaml/github.com/yaml/pyyaml /2,964 stars /

File Manipulation 6 projects

Without installing anything, two Python file manipulation libraries cover paths and file types by name: pathlib and mimetypes. python-magic reads the bytes.

(Python standard library) A cross-platform, object-oriented path library.
Simple, modern and fast file watching and code reload in Python.
API and shell utilities to monitor file system events.
(Python standard library) Map filenames to MIME types.
A Python interface to the libmagic file type identification library.
ahupp/github.com/ahupp/python-magic /2,922 stars /
Detects file content types with a deep-learning model.
google/github.com/google/magika /18,752 stars /

Know a project that belongs here?

Tell us what it does and why it stands out.