pySigma
Sigma rule processing and conversion tools
What it is and what it does
pySigma is a Python library that parses Sigma detection rules—a vendor-neutral format for security detection logic—and converts them into queries for specific security backends and log analysis platforms. It replaces the older sigmac tool with a cleaner, modular architecture where the core library remains slim and vendor-agnostic, while support for specific query languages and log data models is provided by separate backend and pipeline packages.
The library is designed for security engineers and threat hunters who need to translate detection rules across different SIEM and log analysis platforms without rewriting them for each system. It includes support for rule modifiers and processing pipelines. The project is actively maintained, supports Python 3.10 through 3.14, and has no known security vulnerabilities.
Use it for:
- Translate threat detection rules across multiple SIEM platforms from a single Sigma rule source.
- Apply data model transformations to Sigma rules before backend conversion.
- Build custom backends for proprietary or internal log analysis systems using the extension framework.
- Validate and test Sigma rule syntax and logic before deploying to production systems.
- Migrate detection logic from legacy sigmac toolchain to the modular pySigma architecture.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses and converts Sigma detection rules into queries for various security backends and log analysis platforms, replacing the legacy sigmac toolchain with a modular, vendor-agnostic design.
Yes. pySigma is actively maintained, has low install friction, no security vulnerabilities, and fills a clear need for teams managing detection rules across multiple platforms. The copyleft license (LGPL-2.1-only) is standard for security tooling and poses no barrier for most use cases. Install it if you work with Sigma rules or need to convert detection logic across SIEM platforms.
Install
pysigma on PyPI
pip
pip install pysigmauv
uv add pysigmapoetry
poetry add pysigmaInstalling pySigma
Before you install
Low friction: pure Python wheel with no compiled dependencies. Active maintenance with a release 14 days ago; requires Python 3.10 or later. Ten runtime dependencies are all standard libraries.
License in practice
Licensed under LGPL-2.1-only (copyleft). Derivative works and modifications must be distributed under the same license; static linking or distribution of modified versions requires source disclosure.
Quickstart
pip install pysigma
import pyyaml
import jinja2
import requests
# pySigma parses Sigma rules and converts them via backend plugins
# Backend-specific conversion requires installing a dedicated backend package
Requires Python 3.10 or later; backend-specific conversion requires installing a dedicated backend package separate from pySigma itself.
Verify before relying
- Whether the package handles all Sigma rule syntax versions or has known limitations in rule parsing coverage.
- Performance characteristics when processing large rule sets or complex detection logic.
- Stability of the plugin/backend extension API across minor versions.
- Concrete examples of rule conversion workflows beyond what the description excerpt provides.
Package facts
| License | LGPL-2.1-only (copyleft) |
| Python support | supports the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 10 — diskcache, diskcache-stubs, jinja2, jq, packaging, pyparsing, pyyaml, requests, types-pyyaml, typing-extensions |
| Maintenance | actively maintained — 14 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 465,960/month — #6,506 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pysigma-1.5.0-py3-none-any.whl
Tags
More Security packages
Provides Python bindings to the FreeDesktop.org…
permissive · top 1,000 on PyPI
msalMSAL for Python handles OAuth2 and OpenID…
permissive · top 1,000 on PyPI
joserfcjoserfc implements JOSE standards (JWS, JWE,…
permissive · top 1,000 on PyPI
AuthlibAuthlib provides a complete implementation of…
permissive · top 1,000 on PyPI
argon2-cffi-bindingsProvides low-level CFFI bindings to the…
permissive · top 1,000 on PyPI
adalADAL for Python authenticates applications with…
permissive · top 1,000 on PyPI
sigmatoolsSigmatools provides command-line utilities and…
copyleft · top 15,000 on PyPI
ipysigmaA Jupyter widget that renders interactive…
permissive · top 15,000 on PyPI
skope-rulesSkope-rules learns interpretable logical rules…
permissive · top 15,000 on PyPI
PyMeta3PyMeta3 compiles pattern-matching grammars…
permissive · top 15,000 on PyPI
threatwirethreatwire provides real-time network packet…
permissive · top 15,000 on PyPI
plyaraParses YARA rule files into Python dictionary…
permissive · top 15,000 on PyPI
pyniniPynini compiles grammar rules into weighted…
permissive · top 15,000 on PyPI
json_logic_qubitParses and executes JsonLogic rules—a…
permissive · top 15,000 on PyPI