Skip to content

SK-2813: Fix and clean up SDK sample files#243

Open
saileshwar-skyflow wants to merge 1 commit into
saileshwar/SK-2813-python-v2-code-clean-up-and-fixesfrom
saileshwar/SK-2817-update-samples
Open

SK-2813: Fix and clean up SDK sample files#243
saileshwar-skyflow wants to merge 1 commit into
saileshwar/SK-2813-python-v2-code-clean-up-and-fixesfrom
saileshwar/SK-2817-update-samples

Conversation

@saileshwar-skyflow
Copy link
Copy Markdown
Collaborator

Why:
The sample files had several issues that would confuse or break a developer following them:

  • Placeholder values were missing angle brackets (e.g. 'SKYFLOW_ID2' instead of '<SKYFLOW_ID2>'), making them look like real values.
  • deidentify_file.py had a file handle resource leak — open() was called without a context manager, leaving the handle open if the API call threw an error.
  • credentials_options.py had a mismatched vault ID — .vault('YOUR_VAULT_ID') didn't match the configured primary vault ID 'YOUR_VAULT_ID1'.
  • signed_token_generation_example.py had incorrect API usage — unpacking generate_signed_data_tokens as token, signed = ... only works for one token, but the example passed two tokens.
  • deidentify_file_async.py had extra indentation on two parameters inside the request constructor.

Outcome:
All six sample files are corrected, consistent, and copy-pasteable. A developer following any sample will get working code without silent failures or confusing placeholder formats. No README changes were needed — it was already accurate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant