https://github.com/darvid/python-hyperscan
🐍 A CPython extension for the Hyperscan regular expression matching library.
https://github.com/darvid/python-hyperscan
hyperscan python python3 regex regexp regular-expressions
Last synced: 21 days ago
JSON representation
🐍 A CPython extension for the Hyperscan regular expression matching library.
- Host: GitHub
- URL: https://github.com/darvid/python-hyperscan
- Owner: darvid
- License: mit
- Created: 2017-05-26T01:42:13.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2025-02-16T08:09:24.000Z (4 months ago)
- Last Synced: 2025-05-08T09:18:30.698Z (28 days ago)
- Topics: hyperscan, python, python3, regex, regexp, regular-expressions
- Language: C
- Homepage: https://python-hyperscan.readthedocs.io/en/latest/
- Size: 646 KB
- Stars: 172
- Watchers: 7
- Forks: 34
- Open Issues: 28
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Hyperscan/Vectorscan for Python






[](https://python-hyperscan.readthedocs.io/en/latest/)A CPython extension for [Vectorscan][7], an open source fork of
[Hyperscan][8], Intel's open source ([prior to version 5.4][9]),
high-performance multiple regex matching library.* ✅ Binary [manylinux][12]-compatible wheels
* ✅ Statically linked (no need to build Hyperscan/Vectorscan)
* ✅ [Chimera][1] support## Installation
```shell
# 🪄 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][11]), extending the
[manylinux-hyperscan][10] 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][2] support.
* No [custom allocator][3] support.
* ``hs_expression_info``, ``hs_expression_ext_info``,
``hs_populate_platform``, and ``hs_serialized_database_info`` not
exposed yet.See the [documentation][6] for more detailed build instructions.
## Resources
* [PyPI Project][13]
* [Documentation][6]
* [Hyperscan C API Documentation][14][1]: http://intel.github.io/hyperscan/dev-reference/chimera.html
[2]: http://intel.github.io/hyperscan/dev-reference/runtime.html#stream-compression
[3]: http://intel.github.io/hyperscan/dev-reference/runtime.html#custom-allocators
[4]: http://intel.github.io/hyperscan/dev-reference/compilation.html
[5]: https://github.com/darvid/python-hyperscan/issues
[6]: https://python-hyperscan.readthedocs.io
[7]: https://www.vectorcamp.gr/vectorscan/
[8]: https://www.hyperscan.io/
[9]: https://github.com/VectorCamp/vectorscan?tab=readme-ov-file#hyperscan-license-change-after-54
[10]: https://github.com/darvid/manylinux-hyperscan/
[11]: https://github.com/VectorCamp/vectorscan?tab=readme-ov-file#configure--build
[12]: https://github.com/pypa/manylinux
[13]: https://pypi.org/project/hyperscan/
[14]: http://intel.github.io/hyperscan/dev-reference/