Installation
patterndb-yaml can be installed via Homebrew, pipx, pip, or from source.
Requirements
- Python 3.9 or higher (for pip/pipx installations)
- Homebrew (for macOS/Linux Homebrew installation - automatically installs syslog-ng)
- syslog-ng 4.10.1+ (for pattern matching engine)
syslog-ng Dependency
patterndb-yaml requires syslog-ng to be installed. See the syslog-ng Installation Guide for platform-specific instructions.
Homebrew users: syslog-ng is installed automatically as a dependency.
pip/pipx users: You must install syslog-ng separately from official repositories before using patterndb-yaml.
patterndb-yaml works on Linux, macOS, and Windows (via WSL2).
Via Homebrew (macOS/Linux) - Recommended
Automatically installs syslog-ng as a dependency. Homebrew manages all dependencies and provides easy updates via brew upgrade.
Via pipx (Cross-platform)
Install syslog-ng first
Before using pipx, you must install syslog-ng from official repositories. See syslog-ng Installation Guide for detailed instructions.
pipx installs in an isolated environment with global CLI access. Works on macOS, Linux, and Windows. Update with pipx upgrade patterndb-yaml.
Via pip
Install syslog-ng first
Before using pip, you must install syslog-ng from official repositories. See syslog-ng Installation Guide for detailed instructions.
Use pip if you want to use patterndb-yaml as a library in your Python projects.
Via Source
For development or the latest unreleased features:
This installs patterndb-yaml and its dependencies:
- typer - CLI framework
- rich - Terminal formatting and progress display
- pyyaml - YAML parsing
Development Installation
For contributing or modifying patterndb-yaml, install in editable mode with development dependencies:
git clone https://github.com/JeffreyUrban/patterndb-yaml.git
cd patterndb-yaml
pip install -e ".[dev]"
Development dependencies include:
- pytest - Test framework
- pytest-cov - Code coverage
- ruff - Linting and formatting
- mypy - Type checking
- types-pyyaml - Type stubs for YAML
- pre-commit - Git hooks for code quality
Platform-Specific Notes
Linux
Recommended installation methods:
- Homebrew:
brew tap jeffreyurban/patterndb-yaml && brew install patterndb-yaml - pipx:
pipx install patterndb-yaml - pip:
pip install patterndb-yaml
Virtual Environments
If using pip directly, consider using a virtual environment:
macOS
Recommended installation methods:
- Homebrew:
brew tap jeffreyurban/patterndb-yaml && brew install patterndb-yaml(recommended) - pipx:
pipx install patterndb-yaml - pip:
pip install patterndb-yaml
Windows
Recommended installation methods:
- pipx:
pipx install patterndb-yaml(recommended) - pip:
pip install patterndb-yaml
The patterndb-yaml command will be available in your terminal after installation.
Verify Installation
After installation, verify patterndb-yaml is working:
Try a quick test with the --generate-xml option:
This should output valid syslog-ng XML pattern database markup.
Upgrading
Homebrew
pipx
pip
Source Installation
For development installations:
Uninstalling
Homebrew
pipx
pip
Troubleshooting
Command Not Found
If patterndb-yaml command is not found after installation:
-
Check pip installed in the right location:
-
Verify Python scripts directory is in PATH:
Add<user-base>/binto your PATH if needed. -
Use Python module syntax:
Import Errors
If you see import errors, ensure dependencies are installed:
Or reinstall with dependencies:
Permission Errors
If you encounter permission errors, install for your user only:
Or use a virtual environment (recommended):
Next Steps
- Quick Start Guide - Learn basic usage
- Basic Concepts - Understand how
patterndb-yamlworks - CLI Reference - Complete command-line options