file_re
file_re is a Rust-backed Python library for running regular expressions
over large files. It mirrors the public surface of re and adds a
single max_span_lines parameter that controls how much of the file is
held in memory, so the same API scales from small configuration files to
50 GB compressed logs.
Highlights
search,match,findall,finditer, andcompilewith the same shape asre.A
max_span_linesknob:Nonefor full-file scans,1for line-by-line streaming, andNfor a sliding N-line window.Transparent
.gzand.xzdecompression.Proper
re.Matchsemantics, includingNonefor non-participating groups.GIL is released during IO and regex work, so
file_replays well withmultiprocessingand threaded pipelines.
Getting started
API reference