### Install wazuhregex with pip for library use Source: https://github.com/zbalkan/wazuhregex/blob/main/README.md Installs wazuhregex into a Python project's environment, providing both the library and CLI. ```bash python -m pip install wazuhregex ``` -------------------------------- ### Install wazuhregex from local checkout with pipx Source: https://github.com/zbalkan/wazuhregex/blob/main/README.md Installs the application directly from a local checkout in editable mode. ```bash pipx install --editable . ``` -------------------------------- ### Install wazuhregex with pipx using Python 3.13 Source: https://github.com/zbalkan/wazuhregex/blob/main/README.md Selects the recommended Python interpreter explicitly when multiple are installed. ```bash pipx install --python python3.13 wazuhregex ``` -------------------------------- ### Use wazuhregex Python API classes Source: https://github.com/zbalkan/wazuhregex/blob/main/README.md Import the primary classes directly from the package. The example shows WazuhRegex, RegexComparer, and Engine usage. The 100 ms and 20-line limits belong to the CLI; direct Python methods remain ordinary library calls. ```python from wazuhregex import Engine, RegexComparer, WazuhRegex tool = WazuhRegex(r"(\d+)") is_match, spans = tool.os_regex("30 Agustos 2020") if is_match: print(spans) # [(0, 2), (11, 15)] print(tool.get_substrings()) # ["30", "2020"] is_match, spans = tool.os_match("Error: disk full") is_match, spans = tool.pcre2_regex("30 Agustos 2020") comparer = RegexComparer() parsed = comparer.parse(r"\d+", Engine.PCRE2) ``` -------------------------------- ### Install wazuhregex with pipx Source: https://github.com/zbalkan/wazuhregex/blob/main/README.md Installs the wazuhregex command-line tool and its dependencies in an isolated environment, exposing the wazuhregex command on PATH. Recommended for most users. ```bash pipx install wazuhregex ``` -------------------------------- ### Build and validate package with pip, build, and twine Source: https://github.com/zbalkan/wazuhregex/blob/main/README.md Installs the build dependencies, builds the source distribution and wheel, and validates their metadata with twine. Run these commands in sequence before publishing. ```bash python -m pip install -e ".[build]" python -m build python -m twine check dist/* ``` -------------------------------- ### Display wazuhregex help output Source: https://github.com/zbalkan/wazuhregex/blob/main/README.md Run the CLI with --help to print usage information. The help text prints the fixed 20-line and 100 ms limits. The command exits with status 2 for invalid invocation or when input exceeds the 20-line limit. ```bash wazuhregex --help ``` -------------------------------- ### Run wazuhregex via console command or module entry point Source: https://github.com/zbalkan/wazuhregex/blob/main/README.md Use either the console command or the module entry point to run the CLI. The CLI accepts at most 20 physical input lines per invocation, each evaluated in an isolated worker with a 100 ms wall-clock limit. ```bash wazuhregex '' python -m wazuhregex '' ``` -------------------------------- ### Run all tests with pytest Source: https://github.com/zbalkan/wazuhregex/blob/main/README.md Executes the entire test suite for the wazuhregex project. Use this to verify all tests pass. ```bash python -m pytest ``` -------------------------------- ### Pipe input lines to wazuhregex Source: https://github.com/zbalkan/wazuhregex/blob/main/README.md Pipe input lines to the CLI using printf. Each non-empty line is evaluated in an isolated worker with a 100 ms wall-clock limit. ```bash printf '%s\n' 'sshd: error found in log' 'info: all good' | wazuhregex 'error' ``` -------------------------------- ### Run main compatibility suite with pytest Source: https://github.com/zbalkan/wazuhregex/blob/main/README.md Runs the primary compatibility test file, tests/test_wazuhregex.py, which validates core behavior against Wazuh 4.x. ```bash python -m pytest tests/test_wazuhregex.py ``` -------------------------------- ### Upgrade and uninstall wazuhregex with pipx Source: https://github.com/zbalkan/wazuhregex/blob/main/README.md Upgrades or removes the application without affecting other Python tools. ```bash pipx upgrade wazuhregex ``` ```bash pipx uninstall wazuhregex ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.