Skip to content

🐍 A CPython extension for the Hyperscan regular expression matching library.

License

Notifications You must be signed in to change notification settings

ljluestc/python-hyperscan

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 Cannot retrieve latest commit at this time.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hyperscan/Vectorscan for Python

GitHub Actions Workflow Status PyPI - Version PyPI - Downloads PyPI - Python Version PyPI - Wheel PyPI - License Read the Docs

A CPython extension for Vectorscan, an open source fork of Hyperscan, Intel's open source (prior to version 5.4), high-performance multiple regex matching library.

  • βœ… Binary manylinux-compatible wheels
  • βœ… Statically linked (no need to build Hyperscan/Vectorscan)
  • βœ… Chimera support

Installation

# πŸͺ„ Installing libhs is NOT required, because python-hyperscan is statically linked
pip install hyperscan

Build Optimization

If you'd like to use Intel's Hyperscan rather than Vectorscan, or if you'd like to enable native CPU detection to build optimized non-FAT libraries (default off in Vectorscan), extending the manylinux-hyperscan Docker image used to build the binary wheels for this library should be fairly straightforward.

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.

See the documentation for more detailed build instructions.

Resources

About

🐍 A CPython extension for the Hyperscan regular expression matching library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 52.3%
  • Python 23.9%
  • CMake 15.9%
  • Shell 7.1%
  • Dockerfile 0.8%