Skip to content

Commit 6826c00

Browse files
SK-2068: address comments
1 parent 8a4947a commit 6826c00

File tree

1 file changed

+19
-27
lines changed

1 file changed

+19
-27
lines changed

README.md

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The Skyflow Python SDK is designed to help with integrating Skyflow into a Pytho
1919
- [Authenticate](#authenticate)
2020
- [Initialize the client](#initialize-the-client)
2121
- [Insert data into the vault](#insert-data-into-the-vault)
22-
- [Vault](#vault-apis)
22+
- [Vault](#vault)
2323
- [Insert data into the vault](#insert-data-into-the-vault)
2424
- [Detokenize](#detokenize)
2525
- [Tokenize](#tokenize)
@@ -30,9 +30,8 @@ The Skyflow Python SDK is designed to help with integrating Skyflow into a Pytho
3030
- [Redaction types](#redaction-types)
3131
- [Update](#update)
3232
- [Delete](#delete)
33-
- [Invoke Connection](#invoke-connection)
3433
- [Query](#query)
35-
- [Detect](#detect-apis)
34+
- [Detect](#detect)
3635
- [Deidentify Text](#deidentify-text)
3736
- [Reidentify Text](#reidentify-text)
3837
- [Deidentify File](#deidentify-file)
@@ -1698,13 +1697,13 @@ try:
16981697
token_format = TokenFormat( # Specify the token format for deidentified entities
16991698
default=TokenType.VAULT_TOKEN,
17001699
),
1701-
# transformations=Transformations( # Specify custom transformations for entities
1702-
# shift_dates={
1703-
# "max_days": 30,
1704-
# "min_days": 10,
1705-
# "entities": [DetectEntities.DOB]
1706-
# }
1707-
# ),
1700+
transformations=Transformations( # Specify custom transformations for entities
1701+
shift_dates={
1702+
"max_days": 30,
1703+
"min_days": 10,
1704+
"entities": [DetectEntities.DOB]
1705+
}
1706+
),
17081707
allow_regex_list=["<REGEX_PATTERN>"], # Optional regex patterns to allow
17091708
restrict_regex_list=["<REGEX_PATTERN>"] # Optional regex patterns to restrict
17101709
)
@@ -1755,13 +1754,13 @@ try:
17551754
token_format = TokenFormat( # Specify the token format for deidentified entities
17561755
default=TokenType.VAULT_TOKEN,
17571756
),
1758-
# transformations=Transformations( # Specify custom transformations for entities
1759-
# shift_dates={
1760-
# "max_days": 30,
1761-
# "min_days": 30,
1762-
# "entities": [DetectEntities.DOB]
1763-
# }
1764-
# )
1757+
transformations=Transformations( # Specify custom transformations for entities
1758+
shift_dates={
1759+
"max_days": 30,
1760+
"min_days": 30,
1761+
"entities": [DetectEntities.DOB]
1762+
}
1763+
)
17651764
)
17661765

17671766
# Step 2: Call deidentify_text
@@ -1826,11 +1825,9 @@ try:
18261825
# Step 1: Create request to reidentify
18271826
request = ReidentifyTextRequest(
18281827
text="<YOUR_REDACTED_TEXT>", # Text containing tokens to reidentify
1829-
format=ReidentifyFormat(
1830-
redacted=["<ENTITY_TYPE>"], # Entities to show redacted
1831-
masked=["<ENTITY_TYPE>"], # Entities to show masked
1832-
plaintext=["<ENTITY_TYPE>"] # Entities to show as plain text
1833-
)
1828+
redacted_entities=["<ENTITY_TYPE>"], # Entities to show redacted
1829+
masked_entities=["<ENTITY_TYPE>"], # Entities to show masked
1830+
plain_text_entities=["<ENTITY_TYPE>"] # Entities to show as plain text
18341831
)
18351832

18361833
# Step 2: Call reidentify_text
@@ -1872,11 +1869,6 @@ try:
18721869
# Step 1: Create request with deidentified text
18731870
request = ReidentifyTextRequest(
18741871
text="My SSN is [SSN_VqLazzA] and my card is [CREDIT_CARD_54lAgtk].",
1875-
# format=ReidentifyFormat(
1876-
# redacted=[DetectEntities.SSN], # Show SSN redacted
1877-
# masked=[DetectEntities.CREDIT_CARD], # Show credit card masked
1878-
# plaintext=[DetectEntities.DOB] # Show DOB as plain text
1879-
# )
18801872
)
18811873

18821874
# Step 2: Call reidentify_text

0 commit comments

Comments
 (0)