Skip to main content

Python bindings for Hyperscan.

Project description

Hyperscan for Python

python-hyperscan workflow PyPI - Python Version PyPI - Wheel PyPI - Status PyPI - License Read the Docs

A CPython extension for Hyperscan, Intel's open source, high-performance multiple regex matching library. Currently only supports manylinux-compatible Linux distributions.

Installation

pip install hyperscan

API Support

python-hyperscan currently exposes most of the C API, with the following caveats or exceptions:

  • No stream compression support.
  • No custom allocator support.
  • hs_expression_info, hs_expression_ext_info, hs_populate_platform, and hs_serialized_database_info not exposed yet.

✨ As of v0.3.0, python-hyperscan statically links against Hyperscan, so having the library installed on your system is not required. Prior versions of python-hyperscan require Hyperscan v5.2 or newer. ✨

Building from source requires Hyperscan compiled and installed with the following CMake flags set:

  • FAT_RUNTIME=OFF
  • BUILD_STATIC_AND_SHARED=ON only if BUILD_SHARED_LIBS is also on, in the event there are other applications colocated with python-hyperscan that need the shared libraries. Otherwise ignore this flag, as by default Hyperscan will build static libraries.
  • CMAKE_C_FLAGS and CMAKE_CXX_FLAGS set to -fPIC

See the documentation for more detailed build instructions.

Resources

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hyperscan-0.3.2.tar.gz (16.6 kB view hashes)

Uploaded Source

Built Distributions

hyperscan-0.3.2-cp310-cp310-manylinux_2_24_x86_64.whl (4.9 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.24+ x86-64

hyperscan-0.3.2-cp39-cp39-manylinux_2_24_x86_64.whl (4.9 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.24+ x86-64

hyperscan-0.3.2-cp38-cp38-manylinux_2_24_x86_64.whl (4.9 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.24+ x86-64

hyperscan-0.3.2-cp37-cp37m-manylinux_2_24_x86_64.whl (4.9 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.24+ x86-64

hyperscan-0.3.2-cp36-cp36m-manylinux_2_24_x86_64.whl (4.9 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.24+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page