Migrating from the established
datafog package? Start with Migrate from
DataFog Python before translating API
calls.Synchronous functions
transform uses explicit findings. scan_and_transform accepts the divided
configuration envelope with scan and transform sections.
Result objects
Python exposes immutable objects with snake_case attributes:TextRange(start, end)FindingTransformationTransformResultRestorationRestoreResult
Asynchronous manager
Exceptions
DataFogConfigurationErrorDataFogFindingErrorDataFogKeyProviderErrorDataFogInternalError
code, optional reason, optional path, and
optional finding_index attributes. See Errors.
Structured JSON and PERSON fields
Usediscover_fields(data, config=None), scan_structured(data, config=None),
transform_structured(data, findings, config), and
scan_and_transform_structured(data, config). Results expose .mappings and
.findings, or .data and .transformations. PrivacyManager also exposes
transform_structured, scan_and_transform_structured, and restore_structured
for provider-backed work.
Paths are JSON Pointers. All ranges, including JavaScript UTF-16 ranges,
address the decoded string at that path. See person-field discovery
for aliases, policy configuration, input limits, and examples.