Skip to content

Hyperscan for Python

python-hyperscan is an unofficial CPython extension for Intel's Hyperscan, the open source, high-performance multiple regex matching library.


Building Hyperscan

See the official documentation for detailed installation instructions. The following should work for most use cases:

$ git clone
$ mkdir -p hyperscan/build
$ cd hyperscan/build
$ git checkout v5.1.1
$ cmake \
    -G "Unix Makefiles" \
$ # Compile with all available cores:
$ # make -j $(( $(nproc) + 1 ))
$ make
$ sudo make install

Installing python-hyperscan

Installing via pip is recommended:

$ pip install hyperscan

To build and install from source, using Poetry:

$ pip install poetry
$ git clone
$ cd python-hyperscan
$ poetry install