1. GroupDocs Documentation
  2. /
  3. GroupDocs.Redaction Product Family
  4. /
  5. GroupDocs.Redaction for Python via .NET

GroupDocs.Redaction for Python via .NET

groupdocs-redaction-python-home PyPI package PyPI downloads

Release notes Download from PyPI Online app

GroupDocs.Redaction for Python via .NET is a document redaction API that permanently removes sensitive or classified content from documents across many formats. It provides a unified, format-independent interface to redact text by exact phrase or regular expression, scrub or rewrite metadata, black out image areas, rewrite or delete annotations, and remove pages — then save the result in its original format or as a rasterized PDF so redacted content cannot be recovered.

Quick example

from groupdocs.redaction import Redactor
from groupdocs.redaction.redactions import ExactPhraseRedaction, ReplacementOptions

# Redact every occurrence of "John Doe" in a document
with Redactor("sample.docx") as redactor:
    redactor.apply(ExactPhraseRedaction("John Doe", ReplacementOptions("[personal]")))
    redactor.save()

Features

  • Text Redaction: Replace or hide text matched by an exact phrase (case-sensitive or RTL-aware) or a regular expression, with a replacement string or a colored box.
  • Metadata Redaction: Erase or rewrite document metadata, wholesale or filtered by property.
  • Image & Annotation Redaction: Black out image areas, clean embedded image metadata, and rewrite or delete annotations.
  • Page Removal & Rasterization: Remove pages or page ranges, and optionally flatten the result to a rasterized PDF (with PDF/A compliance) so redacted content is unrecoverable.
  • Redaction Policies: Describe a reusable set of redactions as a policy and apply it across many documents.

Supported File Formats

GroupDocs.Redaction supports a wide range of file formats. For a complete list, see the full list of supported formats.

  • Microsoft Office (Word, Excel, PowerPoint)
  • PDF (Standard PDFs, PDF/A output)
  • OpenDocument (ODT, ODS, ODP)
  • Images (JPEG, PNG, GIF, BMP, TIFF)
  • Text (TXT, RTF, CSV)

Getting Started

To get started, refer to the System Requirements, Supported File Formats, Installation, and Hello, World! sections for setup instructions and your first redaction.

Developer Guide

For practical, runnable code examples covering basic and advanced redaction, see the Developer Guide section. It walks through loading documents, applying text, metadata, image, annotation, and page redactions, saving and rasterizing results, and building reusable redaction policies.

AI Agents & LLM Integration

Using an AI coding assistant? The AI Agents & LLM Integration page covers the bundled AGENTS.md reference, the GroupDocs MCP server, and machine-readable documentation.

Technical Support

If you experience any issues or have suggestions, see Technical Support for the available channels — the free support forum and the paid helpdesk. For licensing and evaluation questions, see Licensing and Subscription.