fromgroupdocs.redactionimportRedactionPolicyfromgroupdocs.redaction.redactionsimportExactPhraseRedaction,ReplacementOptionspolicy=RedactionPolicy([ExactPhraseRedaction("ACME",ReplacementOptions("[CO]")),])policy.save("./sample_policy.xml")```## save {#output}Savestheredactionpolicytoastream.```pythondefsave(self,output):...
Parameter
Type
Description
output
io.RawIOBase
Target stream to save the policy.
Example
importiofromgroupdocs.redactionimportRedactionPolicyfromgroupdocs.redaction.redactionsimportExactPhraseRedaction,ReplacementOptionspolicy=RedactionPolicy([ExactPhraseRedaction("ACME",ReplacementOptions("[CO]")),ExactPhraseRedaction("confidential",ReplacementOptions("[REDACTED]")),])withio.BytesIO()asstream:policy.save(stream)# The stream now contains the XML representation of the policy
Aliases
These names call save too, limited to the overloads listed.