Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
e38eae2
SK-3139: Implement query, get_tokens, upload_files, delete_files in f…
saileshwar-skyflow Oct 6, 2026
66ed251
[AUTOMATED] Private Release 1.0.1.dev0+e38eae2
saileshwar-skyflow Oct 6, 2026
47f66cd
SK-3139: parallelize + stream flowvault file uploads, reject duplicat…
saileshwar-skyflow Oct 8, 2026
fe23f66
[AUTOMATED] Private Release 1.0.1.dev0+47f66cd
saileshwar-skyflow Oct 8, 2026
12ddf31
SK-3139: drop content_type from upload column; pre-publish cleanups
saileshwar-skyflow Oct 9, 2026
e7baa8a
[AUTOMATED] Private Release 1.0.1.dev0+12ddf31
saileshwar-skyflow Oct 9, 2026
865a4f5
SK-3075: add Detect V2 to flowvault and skyvault SDKs
saileshwar-skyflow Oct 26, 2026
05b2e1d
SK-3075: fix generated version fallback and refresh API contract base…
saileshwar-skyflow Oct 26, 2026
8774fe4
SK-3075: make common detect tests unittest-compatible
saileshwar-skyflow Oct 26, 2026
e1c3e28
SK-3075: document Detect V2 for skyvault
promptless[bot] Oct 26, 2026
a976075
SK-3075: fix API reference link in skyvault samples README
promptless[bot] Oct 26, 2026
fad619e
SK-3075: split detect DataSourceType into per-SDK DeidentifySourceTyp…
saileshwar-skyflow Nov 2, 2026
80d0d18
SK-3075: rename the Detect README section heading to "Detect"
saileshwar-skyflow Nov 3, 2026
22d6b35
SK-3075: fix auth, version, and skyvault data-plane after codegen regen
saileshwar-skyflow Nov 3, 2026
1ccf503
SK-3075: refresh API contract baselines for DeidentifySourceType/Reid…
saileshwar-skyflow Nov 3, 2026
d4e8d51
Merge remote-tracking branch 'origin/main' into saileshwar/SK-3075-ad…
saileshwar-skyflow Nov 3, 2026
4c58420
SK-3075: update skyvault unit tests for the new-codegen data-plane an…
saileshwar-skyflow Nov 3, 2026
e13cffd
SK-3075: split detect RedactionLevel into a per-SDK rule (match Java)
saileshwar-skyflow Nov 3, 2026
893a976
SK-3075: fix common detect test for the RedactionLevel split
saileshwar-skyflow Nov 3, 2026
28905b7
SK-3075: make the skyvault sdist self-contained
saileshwar-skyflow Nov 3, 2026
12bdad5
SK-3075: regenerate skyvault files client for multipart file upload
saileshwar-skyflow Nov 4, 2026
deaa724
SK-3075: restore working skyvault generated version.py
saileshwar-skyflow Nov 4, 2026
4bb4129
SK-3075: re-trigger PR CI on the restored generated version.py
saileshwar-skyflow Nov 4, 2026
9ef1103
SK-3075: merge latest Detect V2 source branch into docs branch
promptless[bot] Nov 4, 2026
f58da00
SK-3075: use DeidentifySourceType and ReidentifySourceType in skyvaul…
promptless[bot] Nov 4, 2026
7e82842
SK-3284: add detect V1 to V2 migration guide for skyvault python sdk
saileshwar-skyflow Nov 4, 2026
688c432
SK-3075: document Detect V2 in skyvault and flowvault READMEs and sam…
saileshwar-skyflow Nov 5, 2026
1862ec5
Merge remote-tracking branch 'origin/saileshwar/SK-3075-add-detect-v2…
promptless[bot] Nov 5, 2026
0f77402
SK-3075: align flowvault Detect V2 with Java and add detect to flowva…
saileshwar-skyflow Nov 5, 2026
5831909
SK-3075: expose includePrefix / prefixOverride on Detect Entity and C…
saileshwar-skyflow Nov 6, 2026
fb84c3f
Merge remote-tracking branch 'origin/saileshwar/SK-3075-add-detect-v2…
promptless[bot] Nov 6, 2026
1ccbea8
SK-3075: clarify that PollOptions wait_time caps backoff wait, not el…
promptless[bot] Nov 6, 2026
e52cd43
SK-3075: add Detect V2 to flowvault and skyvault SDKs (#286)
saileshwar-skyflow Nov 6, 2026
6f1e666
[AUTOMATED] Private Release 1.0.1.dev0+e52cd43
saileshwar-skyflow Nov 6, 2026
1e35b3a
SK-3075: Merge flowvault-release/26.10.0 into docs branch
promptless[bot] Nov 6, 2026
e511fe6
SK-3075: document Detect token prefix options and flowvault Detect di…
promptless[bot] Nov 6, 2026
99a4ea2
SK-3075: link the renamed Detect migration guide and drop the Detect …
promptless[bot] Nov 9, 2026
baebace
SK-3289: address Detect docs and sample parity feedback (Python) (#290)
saileshwar-skyflow Nov 11, 2026
e87b3bd
Merge remote-tracking branch 'origin/flowvault-release/26.10.0' into …
promptless[bot] Nov 11, 2026
65d4e1b
SK-3139: note that upload_files and delete_files reject repeated columns
promptless[bot] Nov 11, 2026
65919a7
SK-3075: Merge main into docs branch after the flowvault release merge
promptless[bot] Nov 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
456 changes: 338 additions & 118 deletions docs/api_reference.md

Large diffs are not rendered by default.

35 changes: 27 additions & 8 deletions flowvault/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ Upload one or more files to file columns. The SDK **orchestrates** this in two s

**Note:**

- `records` is required and must be a non-empty list of `UploadFilesRequestRecord`; each needs a `table_name` and a non-empty `columns` list.
- `records` is required and must be a non-empty list of `UploadFilesRequestRecord`; each needs a `table_name` and a non-empty `columns` list. A column can appear only once in a record; a repeated column name fails validation.
Comment thread
promptless[bot] marked this conversation as resolved.
Resolved
- Each `UploadFilesRequestColumn` needs a `column` name and **exactly one** file source — `file_path`, `base64`, or `file_object`. `base64` additionally requires `file_name`. The upload's content type is inferred from the file name.
- Omit `skyflow_id` to create a new record (CREATE permission); set it to upload into an existing record (UPDATE permission).
- `file_name` is derived from `file_path`/`file_object` when omitted; if still unset, the server generates one.
Expand Down Expand Up @@ -893,7 +893,7 @@ Delete files from file columns of existing records — and remove the stored obj

**Note:**

- `records` is required and must be a non-empty list of `DeleteFilesRequestRecord`; each needs a `table_name` and a non-empty `columns` list of file-column names.
- `records` is required and must be a non-empty list of `DeleteFilesRequestRecord`; each needs a `table_name` and a non-empty `columns` list of file-column names. A column name can appear only once in a record; a repeated name fails validation.
Comment thread
promptless[bot] marked this conversation as resolved.
Resolved
- Each record sets **exactly one** of `skyflow_id` or `unique_values` — both, or neither, fails validation.
- `unique_values` takes the same shape as in [Get](#get): a list of dicts, each holding the unique column-name/value pairs that identify a record; each may resolve to more than one record.

Expand Down Expand Up @@ -1005,7 +1005,7 @@ detect = skyflow_client.detect()
- **Role.** The service account needs the Detect Invoker, Detect Manager or Vault Owner role on the vault. Detect Invoker can de-identify data and write vault tokens into the vault; Detect Manager adds the ability to create, update and delete Detect configurations. Re-identifying values stored as `VAULT_TOKEN` is governed like detokenization: the caller also needs a policy granting the Detokenization action on the destination, unless it is a Vault Owner.
- **Configuration.** Pass `configuration_id` (the id of a stored Detect configuration) or an inline `configuration` (a `DetectConfiguration`). Both are optional: with neither set the SDK sends only the vault id and the run uses the vault's default Detect settings; sending both is rejected by the API with HTTP 400. Create and manage stored configurations — and copy their ids — in Studio (vault → **Detect**) or through the management API; the SDK does not create them.
- **Destination for vault tokens.** An entity de-identified with `VAULT_TOKEN` stores its value in the token group named by `destination`. That token group must already exist in the vault; Detect writes into it but does not create it. Create token groups, and the named redaction patterns that re-identification applies, in the vault schema in Studio.
- **API reference.** Every Detect request, response and configuration class is listed in the [API Reference](../docs/api_reference.md).
- **API reference.** Every Detect request, response and configuration class is listed in the [API Reference](../docs/api_reference.md). That reference is written for skyvault; its [Detect helper classes](../docs/api_reference.md#detect-helper-classes) section lists where flowvault differs.

## deidentify_string

Expand Down Expand Up @@ -1060,9 +1060,9 @@ Returns a `DeidentifyStringResponse` with `processed_text`, `entities` (each a `
| Class | Fields | Notes |
|-------|--------|-------|
| `Detect` | `entities`, `object_entities`, `restrict`, `skip`, `custom_types`, `return_entities` | `restrict` / `skip` are regexes always / never treated as sensitive. `return_entities` is `EXCLUDE_SENSITIVE_DATA` (server default), `ALL` or `NONE`. |
| `Entity` | `entity_type`, `deidentification_type`, `destination`, `transformation`, `include_prefix`, `prefix_override` | `entity_type` defaults to `ALL`. `deidentification_type` is `ENTITY_UNIQUE_COUNTER` (server default), `ENTITY_ONLY`, `MASK` or `VAULT_TOKEN`. `destination` (a token group name) is used only with `VAULT_TOKEN`. `include_prefix` (`IncludePrefix.YES` / `IncludePrefix.NO`) and `prefix_override` also apply only to `VAULT_TOKEN`: `include_prefix=IncludePrefix.NO` stores a raw token that **cannot be re-identified** (a data-loss trap), and `prefix_override` replaces the entity-type label in the token with a custom one. |
| `Entity` | `entity_type`, `deidentification_type`, `destination`, `transformation`, `include_prefix`, `prefix_override` | `entity_type` defaults to `ALL`. `deidentification_type` is `ENTITY_UNIQUE_COUNTER` (server default), `ENTITY_ONLY`, `MASK` or `VAULT_TOKEN`. `destination` (a token group name) is used only with `VAULT_TOKEN`. `include_prefix` and `prefix_override` are described below the table. |
| `Transformation` / `ShiftDates` | `shift_dates`; `min_days`, `max_days` | Shifts detected dates by a random number of days within the range. |
| `CustomType` | `label`, `match`, `deidentification_type`, `destination`, `include_prefix`, `prefix_override` | A regex-defined entity type; `label` is reported as the entity type of its matches. `deidentification_type`, `destination`, `include_prefix` and `prefix_override` behave exactly as on `Entity`. |
| `CustomType` | `label`, `match`, `deidentification_type`, `destination`, `include_prefix`, `prefix_override` | A regex-defined entity type; `label` is reported as the entity type of its matches. The other fields work as they do on `Entity`. |
| `ObjectEntity` | `entity_type`, `deidentification_type` | Visual objects in images: `FACE`, `LICENSE_PLATE`, `LOGO`, `SIGNATURE` or `ALL`, handled with `REDACT` or `UNREDACT`. File inputs only. |
| `FileMapping` | `source`, `destination`, `output_file_name_suffix`, `entities_destination`, `object_entities_destination` | Where the processed file and entity files are written. File inputs only. |
| `Media` | `audio`, `document`, `image` | Media-type options. File inputs only. |
Expand Down Expand Up @@ -1104,14 +1104,33 @@ configuration = DetectConfiguration(
)
```

**Token prefixes.** With `VAULT_TOKEN`, a generated token starts by default with the entity type, for example `[NAME_<token>]`. To change this, set `include_prefix` and `prefix_override` on an `Entity` or `CustomType`:
Comment thread
promptless[bot] marked this conversation as resolved.
Resolved

- `prefix_override='NAAM'` produces `[NAAM_<token>]`.
- `include_prefix=IncludePrefix.NO` returns the raw vault token. A token without its prefix can't be re-identified later, so use it only when you won't need the original value back.

You can't combine `prefix_override` with `include_prefix=IncludePrefix.NO`. When you set neither, the server default applies. Import `IncludePrefix` from `skyflow.utils.enums`.

```python
from skyflow.vault.detect import Entity
from skyflow.utils.enums import EntityType, DeidentificationType

Entity(
entity_type=EntityType.NAME,
deidentification_type=DeidentificationType.VAULT_TOKEN,
destination='<TOKEN_GROUP_NAME>',
prefix_override='NAAM',
)
```

## deidentify_file

De-identifies a file. The API is asynchronous: the submit call returns a run id and the result is retrieved from the run. Build the request with `DeidentifyFileRequest`.

Supply the file in exactly one of three ways: `file_path`, `file`, or `value` plus a `DeidentifySourceType` `data_source` (`BASE64` or `PRESIGNED_URL`). flowvault does **not** support a Skyflow ID as a file source — its `DeidentifySourceType` has only `BASE64` and `PRESIGNED_URL`. A local `file` / `file_path` is read when the request is sent, base64-encoded, and its `data_format` inferred from the extension. Passing more than one of them, or none, fails client-side validation before any network call. `configuration_id` / `configuration` follow the same rules as for strings (see [Before you start](#before-you-start)).
Supply the file in exactly one of three ways: `file_path`, `file`, or `value` plus a `DeidentifySourceType` `data_source` (`BASE64` or `PRESIGNED_URL`; flowvault doesn't accept a Skyflow ID as the source). A local `file` / `file_path` is read when the request is sent, base64-encoded, and its `data_format` inferred from the extension. Passing more than one of them, or none, fails client-side validation before any network call. `configuration_id` / `configuration` follow the same rules as for strings (see [Before you start](#before-you-start)).
Comment thread
promptless[bot] marked this conversation as resolved.
Resolved

- **Submit only** (default): one call, returns `run_id`. `status` is `None` and nothing is written to disk — retrieve the result later with [`get_run`](#get_run).
- **Submit and poll**: pass `poll_options`. The SDK polls with exponential backoff (1, 2, 4, 8, 16, then 32 seconds) until the run is `SUCCESS`, `FAILED` or `UNKNOWN`, or until `wait_time` (default 60 s, max 300) or `max_attempts` (default and max 23) is used up. If the budget runs out the response carries the run id with `IN_PROGRESS` or `QUEUED`, so you can resume with `get_run`. `output_directory` is valid only with `poll_options`; setting it without them fails client-side validation.
- **Submit and poll**: pass `poll_options`. The SDK polls with exponential backoff (1, 2, 4, 8, 16, then 32 seconds) until the run is `SUCCESS`, `FAILED` or `UNKNOWN`, or until `wait_time` (default 60 s, max 300) or `max_attempts` (default and max 23) is used up. `wait_time` caps the combined sleep between status checks, not the elapsed time, so polling can run longer than `wait_time`. If the budget runs out the response carries the run id with `IN_PROGRESS` or `QUEUED`, so you can resume with `get_run`. `output_directory` is valid only with `poll_options`; setting it without them fails client-side validation.
Comment thread
promptless[bot] marked this conversation as resolved.
Resolved

```python
from skyflow.vault.detect import DeidentifyFileRequest, PollOptions
Expand Down Expand Up @@ -1149,7 +1168,7 @@ else: # IN_PROGRESS or QUEUED: budget ran out, resume
- `/data/processed/processed-entities-patient-notes.json` — the detected entities
- `/data/processed/processed-object-entities-patient-notes.json` — object entities, when the run produced them

`output_directory` is created if it does not exist. **If you poll a local file and omit `output_directory`, these files are written to the current working directory** — often your project root or a server's working directory — so set `output_directory` explicitly. A request built from a `PRESIGNED_URL` value has no local name to derive from, and presigned-URL outputs are not fetched, so in that case read `response.output` and write the files yourself.
`output_directory` is created if it does not exist. **If you poll a local file and omit `output_directory`, these files are written to the current working directory** — often your project root or a server's working directory — so set `output_directory` explicitly. A request built from `data_source` and `value` has no local file name to derive from, and the SDK doesn't fetch presigned-URL outputs. In those cases, read `response.output` and write the files yourself.

**Supported formats and limits.** `data_format` accepts every `DeidentifyFileDataFormat`: `bmp`, `csv`, `dcm`, `doc`, `docx`, `gif`, `jpeg`, `jpg`, `json`, `jsonl`, `mp3`, `pdf`, `png`, `ppt`, `pptx`, `tif`, `tiff`, `txt`, `wav`, `xls`, `xlsx`, `xml`, `zip`. The `VAULT_TOKEN` de-identification type is supported only for `txt`, `csv`, `json`, `jsonl`, `xml`, `docx`, `xlsx` and `pptx`.

Expand Down
Loading
Loading