|
| 1 | +================================ |
| 2 | +Getting Started With DataFog 4.5 |
| 3 | +================================ |
| 4 | + |
| 5 | +DataFog 4.5 focuses on lightweight text PII screening. A core install should |
| 6 | +let you scan and redact common structured PII without installing OCR, Spark, |
| 7 | +large NLP models, or middleware integrations. |
| 8 | + |
| 9 | +Install Profiles |
| 10 | +================ |
| 11 | + |
| 12 | +Core text screening: |
| 13 | + |
| 14 | +.. code-block:: bash |
| 15 | +
|
| 16 | + pip install datafog |
| 17 | +
|
| 18 | +Optional extras are explicit: |
| 19 | + |
| 20 | +.. list-table:: |
| 21 | + :header-rows: 1 |
| 22 | + |
| 23 | + * - Profile |
| 24 | + - Install command |
| 25 | + - Use when |
| 26 | + * - Core |
| 27 | + - ``pip install datafog`` |
| 28 | + - You need regex-based text scanning, redaction, and guardrail helpers. |
| 29 | + * - NLP |
| 30 | + - ``pip install "datafog[nlp]"`` |
| 31 | + - You need spaCy-backed named entity recognition. |
| 32 | + * - Advanced NLP |
| 33 | + - ``pip install "datafog[nlp-advanced]"`` |
| 34 | + - You need GLiNER-backed named entity recognition. |
| 35 | + * - OCR |
| 36 | + - ``pip install "datafog[ocr]"`` |
| 37 | + - You need local image text extraction before PII scanning. |
| 38 | + * - OCR from URLs |
| 39 | + - ``pip install "datafog[web,ocr]"`` |
| 40 | + - You need DataFog to download image inputs before OCR. |
| 41 | + * - Spark |
| 42 | + - ``pip install "datafog[distributed]"`` |
| 43 | + - You need the optional ``SparkService`` surface. |
| 44 | + * - Everything |
| 45 | + - ``pip install "datafog[all]"`` |
| 46 | + - You are developing or deliberately want every optional surface. |
| 47 | + |
| 48 | +Python Usage |
| 49 | +============ |
| 50 | + |
| 51 | +Use the top-level helpers for the 4.5 core path: |
| 52 | + |
| 53 | +.. code-block:: python |
| 54 | +
|
| 55 | + import datafog |
| 56 | +
|
| 57 | + text = "Contact jane@example.com or call 415-555-1212" |
| 58 | +
|
| 59 | + scan_result = datafog.scan(text, engine="regex") |
| 60 | + print(scan_result.entities) |
| 61 | +
|
| 62 | + redact_result = datafog.redact(text, engine="regex") |
| 63 | + print(redact_result.redacted_text) |
| 64 | +
|
| 65 | + print(datafog.sanitize("Card: 4111-1111-1111-1111")) |
| 66 | +
|
| 67 | +Agent-oriented helpers use the same lightweight text path: |
| 68 | + |
| 69 | +.. code-block:: python |
| 70 | +
|
| 71 | + import datafog |
| 72 | +
|
| 73 | + prompt = "My SSN is 123-45-6789" |
| 74 | + scan_result = datafog.scan_prompt(prompt, engine="regex") |
| 75 | +
|
| 76 | + if scan_result.entities: |
| 77 | + print("PII detected before sending the prompt") |
| 78 | +
|
| 79 | + output = "Email me at jane.doe@example.com" |
| 80 | + safe_output = datafog.filter_output(output, engine="regex") |
| 81 | + print(safe_output.redacted_text) |
| 82 | +
|
| 83 | +CLI Usage |
| 84 | +========= |
| 85 | + |
| 86 | +The CLI core path is text-first: |
| 87 | + |
| 88 | +.. code-block:: bash |
| 89 | +
|
| 90 | + datafog scan-text "Contact jane@example.com" |
| 91 | + datafog redact-text "Contact jane@example.com" |
| 92 | + datafog replace-text "Contact jane@example.com" |
| 93 | + datafog hash-text "Contact jane@example.com" |
| 94 | +
|
| 95 | +Image commands are optional. Install ``datafog[ocr]`` for local OCR and |
| 96 | +``datafog[web,ocr]`` when the CLI needs to download image inputs. |
| 97 | + |
| 98 | +What 4.5 Is Not |
| 99 | +=============== |
| 100 | + |
| 101 | +DataFog 4.5 prepares the package for future middleware use cases, but it does |
| 102 | +not ship dedicated Sentry, OpenTelemetry, logging-framework, or cloud DLP |
| 103 | +adapters. Those integrations are future-facing work built on the same core |
| 104 | +text screening path. |
| 105 | + |
| 106 | +Next Pages |
| 107 | +========== |
| 108 | + |
| 109 | +* :doc:`python-sdk` documents the Python API surface. |
| 110 | +* :doc:`cli` documents command-line usage. |
| 111 | +* :doc:`optional-surfaces` documents OCR and Spark install notes. |
| 112 | +* :doc:`roadmap` explains how 4.5 leads toward later middleware work. |
0 commit comments