--- id: hyperscan version: "0.8.2" license: MIT license_treatment: permissive maintenance: active --- # hyperscan — Python bindings for Hyperscan. License: permissive · Maintenance: active · Downloads: 425.8K/mo ## What it is and what it does Hyperscan is a CPython extension that wraps Vectorscan, Intel's high-performance regex engine designed to match many patterns at once. Unlike Python's built-in `re` module, which compiles and tests patterns sequentially, Hyperscan compiles multiple patterns into a single state machine and scans text in a single pass, making it much faster for workloads that need to test dozens or hundreds of patterns simultaneously. The package ships with pre-built wheels that include Vectorscan statically linked, so you don't need to install system libraries separately. The library exposes most of Vectorscan's C API, including Chimera support for advanced matching modes. It supports Python 3.8 through 3.14 on macOS, Linux, and Windows. The main limitations are lack of stream compression and custom allocator support, and a few specialized C functions not yet exposed to Python. Use it for: - Intrusion detection or network traffic analysis where you need to match many malicious patterns against packet payloads in real time. - Log aggregation or security event filtering, scanning incoming logs against a large set of rules or signatures. - Content scanning or data loss prevention, checking documents or data streams against many forbidden patterns simultaneously. - Regex-based data extraction or validation at scale, where you need to test many patterns against large text corpora efficiently. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Python bindings for Vectorscan (an open-source fork of Intel's Hyperscan), a high-performance library for matching multiple regex patterns simultaneously against text. Yes, if you need to match many regex patterns against text and performance is a concern. The pre-built wheels make installation straightforward on common platforms. The MIT license and active maintenance are favorable. Install it only if your workload genuinely requires bulk pattern matching; for single-pattern or simple regex tasks, Python's built-in `re` module is sufficient and simpler. ## Install pip install hyperscan uv add hyperscan poetry add hyperscan ## Installing hyperscan Before you install: Medium install friction due to compiled C extension wheels, but pre-built wheels are available for common platforms (macOS, Linux, Windows) and Python versions (3.8–3.14), eliminating the need to build Hyperscan locally. Repository is actively maintained with recent commits. License in practice: MIT license is permissive; you may use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions. Quickstart: pip install hyperscan import hyperscan db = hyperscan.compile([(b"pattern1", 0), (b"pattern2", 0)]) matches = db.scan(b"text to search") Requires Python 3.9 or later; compiled wheel must match your platform and Python version. Verify before relying: - Performance benchmarks or throughput comparisons versus standard Python regex or other high-performance regex libraries. - Whether stream compression and custom allocator support are planned for future releases. - Real-world latency or memory overhead for typical pattern sets and text sizes. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 425.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags high-performance regex matching, multiple pattern matching library, vectorscan python bindings, hyperscan python wrapper, fast regex engine, bulk pattern matching, compiled regex patterns, regex-engine, performance-critical [View on SkillFed](https://skillfed.io/packages/hyperscan) · [View on PyPI](https://pypi.org/project/hyperscan/)