Redact individual files
Last updated
Last updated
You can use the Textual SDK to redact and synthesize values in individual files.
Before you perform these tasks, remember to instantiate the SDK client.
For a self-hosted instance, you can also configure the S3 bucket to use to store the files. This is the same S3 bucket that is used to store files for uploaded file pipelines. For more information, go to Setting the S3 bucket for file uploads and redactions. For an example of an IAM role with the required permissions, go to .
To send an individual file to Textual, you use textual.start_file_redaction
.
You first open the file so that Textual can read it, then make the call for Textual to read the file.
The response includes:
The file name
The identifier of the job that processed the file. You use this identifier to retrieve a transformed version of the file.
After you use textual.start_file_redaction
to send the file to Textual, you use tonic.download_redacted_file
to retrieve a transformed version of the file.
To identify the file, you use the job identifier that you received from textual.start_file_redaction
. You can also specify whether to redact, synthesize, or ignore specific entity types. By default, all of the values are redacted.
Before you make the call to download the file, you specify the path to download the file content to.