You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+53Lines changed: 53 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,59 @@
2
2
3
3
All notable changes to this project will be documented in this file.
4
4
5
+
## [2.0.2] - 2026-05-06
6
+
### Added
7
+
- Dict context support for Conditional Data Access.
8
+
9
+
## [2.0.1] - 2026-04-29
10
+
### Fixed
11
+
- Fern client re-initialisation on token refresh.
12
+
13
+
## [2.0.0] - 2025-11-11
14
+
### Added
15
+
- Multi-vault and multi-connection support via fluent builder (`Skyflow.builder()`).
16
+
- New typed request and response classes for all vault operations (`InsertRequest`, `GetRequest`, `UpdateRequest`, `DeleteRequest`, `QueryRequest`, `DetokenizeRequest`, `TokenizeRequest`, `FileUploadRequest`).
17
+
- Detect API: `deidentify_text`, `reidentify_text`, `deidentify_file`, and `get_detect_run`.
18
+
- File upload support via `vault().upload_file()`.
19
+
- Flexible credential types: API key, static bearer token, service account credentials string, credentials file path, and `SKYFLOW_CREDENTIALS` environment variable.
20
+
-`SkyflowError` now includes `http_code`, `grpc_code`, `http_status`, `request_id`, and `details` fields.
21
+
-`set_log_level()` on the client for runtime log level changes.
22
+
23
+
### Changed
24
+
- Complete rewrite of the SDK public API. See [docs/migrate_to_v2.md](docs/migrate_to_v2.md) for migration instructions.
25
+
26
+
## [1.16.0] - 2025-09-23
27
+
### Fixed
28
+
- Remote disconnect error in vault operations.
29
+
30
+
## [1.15.8] - 2025-09-30
31
+
### Fixed
32
+
- Retry logic when `continue_on_error` is set to `true` in insert.
33
+
34
+
## [1.15.7] - 2025-09-23
35
+
### Fixed
36
+
- Retry handling for errors in insert method.
37
+
38
+
## [1.15.6] - 2025-09-22
39
+
### Fixed
40
+
- Added retry logic for transient errors.
41
+
42
+
## [1.15.5] - 2025-09-18
43
+
### Fixed
44
+
- Remote disconnected errors in vault operations.
45
+
46
+
## [1.15.4] - 2025-09-12
47
+
### Fixed
48
+
- Retry on exception during vault requests.
49
+
50
+
## [1.15.3] - 2025-09-12
51
+
### Fixed
52
+
- Retry on exception during vault requests.
53
+
54
+
## [1.15.2] - 2025-09-12
55
+
### Fixed
56
+
- Retry on connection error in insert method.
57
+
5
58
## [1.15.1] - 2023-12-07
6
59
## Fixed
7
60
- Not receiving tokens when calling Get with options tokens as true.
Copy file name to clipboardExpand all lines: README.md
+55-4Lines changed: 55 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
# Skyflow Python SDK
2
2
3
+
> **This is the current, recommended version of the Skyflow SDK.** V2.1.0 brings flexible auth, multi-vault support, native data types, and rich error diagnostics.
4
+
>
5
+
> Migrating from v1? See the **[Migration Guide](https://github.com/skyflowapi/skyflow-python/blob/main/docs/migrate_to_v2.md)** for step-by-step instructions. V1 is in maintenance mode and will reach End of Life on October 31, 2026.
6
+
3
7
The Skyflow Python SDK is designed to help with integrating Skyflow into a Python backend.
4
8
5
9
## Table of Contents
@@ -703,18 +707,65 @@ options = {
703
707
704
708
Embed context values into a bearer token during generation so you can reference those values in your policies. This enables more flexible access controls, such as tracking end-user identity when making API calls using service accounts, and facilitates using signed data tokens during detokenization.
705
709
706
-
Generate bearer tokens containing context information using a service account with the context_id identifier. Context information is represented as a JWT claim in a Skyflow-generated bearer token. Tokens generated from such service accounts include a context_identifier claim, are valid for 60 minutes, and can be used to make API calls to the Data and Management APIs, depending on the service account's permissions.
710
+
Generate bearer tokens containing context information using a service account with the `context_id` identifier. Context information is represented as a JWT claim in a Skyflow-generated bearer token. Tokens generated from such service accounts include a `context_identifier` claim, are valid for 60 minutes, and can be used to make API calls to the Data and Management APIs, depending on the service account's permissions.
711
+
712
+
The `ctx` parameter accepts either a **string** or a **dict**:
713
+
714
+
**String context** — use when your policy references a single context value:
**Dict context** — use when your policy needs multiple context values for conditional data access. Each key in the dict maps to a Skyflow CEL policy variable under `request.context.*`:
With the dict above, your Skyflow policies can reference `request.context.role`, `request.context.department`, and `request.context.user_id` to make conditional access decisions.
735
+
736
+
Dict keys must contain only alphanumeric characters and underscores (`[a-zA-Z0-9_]`). Invalid keys will raise a `SkyflowError`.
707
737
708
738
> [!TIP]
709
-
> See the full example in the samples directory: [token_generation_with_context_example.py](samples/service_account/token_generation_with_context_example.py)
710
-
> See [docs.skyflow.com](https://docs.skyflow.com) for more details on authentication, access control, and governance for Skyflow.
739
+
> See the full example in the samples directory: [token_generation_with_context_example.py](samples/service_account/token_generation_with_context_example.py)
740
+
> See Skyflow's [context-aware authorization](https://docs.skyflow.com) and [conditional data access](https://docs.skyflow.com)docs for policy variable syntax like `request.context.*`.
711
741
712
742
#### Generate signed data tokens: `generate_signed_data_tokens(filepath, options)`
713
743
714
744
Digitally sign data tokens with a service account's private key to add an extra layer of protection. Skyflow generates data tokens when sensitive data is inserted into the vault. Detokenize signed tokens only by providing the signed data token along with a bearer token generated from the service account's credentials. The service account must have the necessary permissions and context to successfully detokenize the signed data tokens.
715
745
746
+
The `ctx` parameter on signed data tokens also accepts either a **string** or a **dict**, using the same format as bearer tokens:
747
+
748
+
```python
749
+
# String context
750
+
options = {
751
+
'ctx': 'user_12345',
752
+
'data_tokens': ['dataToken1', 'dataToken2'],
753
+
'time_to_live': 90,
754
+
}
755
+
756
+
# Dict context
757
+
options = {
758
+
'ctx': {
759
+
'role': 'analyst',
760
+
'department': 'research',
761
+
},
762
+
'data_tokens': ['dataToken1', 'dataToken2'],
763
+
'time_to_live': 90,
764
+
}
765
+
```
766
+
716
767
> [!TIP]
717
-
> See the full example in the samples directory: [signed_token_generation_example.py](samples/service_account/signed_token_generation_example.py)
768
+
> See the full example in the samples directory: [signed_token_generation_example.py](samples/service_account/signed_token_generation_example.py)
718
769
> See [docs.skyflow.com](https://docs.skyflow.com) for more details on authentication, access control, and governance for Skyflow.
0 commit comments