Installation¶
Requirements¶
- Python ≥ 3.11
- uv or pip for package management
Install RAMPART¶
Using uv (recommended)¶
Create a virtual environment and install RAMPART:
Or, if you already have a project:
Using pip¶
Both approaches install RAMPART and all dependencies, including PyRIT v0.13.0.
Install from Source¶
Using uv¶
Bash
uv init rampart-dev-env
cd rampart-dev-env
uv add rampart --git https://github.com/microsoft/RAMPART.git
Using pip¶
For development dependencies (linting, type checking, test tooling):
Bash
# uv (recommended — installs the dev group by default)
uv sync
# pip
pip install -e . --group dev
Optional Extras¶
RAMPART's core install is intentionally small. Features that pull in heavy provider SDKs are exposed as optional extras:
| Extra | Pulls in | When you need it |
|---|---|---|
onedrive |
msgraph-sdk, azure-identity |
Using the built-in OneDriveSurface to plant XPIA payloads in OneDrive. |
Install one or more extras with the standard bracket syntax:
Bash
pip install "rampart[onedrive]"
# or from source:
pip install -e ".[onedrive]"
# or with uv:
uv add "rampart[onedrive]"
Verify Installation¶
Confirm the RAMPART pytest plugin is registered by checking its markers:
Expected output:
Text Only
@pytest.mark.harm(*categories): categorize by harm type
@pytest.mark.trial(n=, threshold=): statistical repetition
RAMPART registers as a pytest plugin automatically via the pytest11 entry point. No conftest.py configuration is needed to activate it.
Setting Up Your Test Project¶
Your pyproject.toml should include: