Python SDK: Migrate from V1 to V2
Python SDK: Migrate from V1 to V2
Python SDK: Migrate from V1 to V2
This guide outlines the steps required to migrate the Skyflow Python SDK from version 1 (v1) to version 2 (v2).
V1 required a token provider function. V2 lets you choose from five credential types.
V1:
V2:
Use only one authentication method. API key or environment variables are recommended for production use.
V2 introduces a builder pattern for client initialization and adds multi-vault support. Log levels are now per-instance instead of global.
V1:
V2:
Key changes:
vault_url replaced with cluster_idenv is now required (Env.PROD, Env.SANDBOX)V2 uses constructor parameters for InsertRequest instead of a plain dict. Responses use typed classes.
V1:
V2:
V1 response:
V2 response:
V2 uses constructor parameters on InsertRequest instead of a separate InsertOptions object.
V1:
V2:
V2 errors include more detail to help with debugging.
V1:
V2:
Use the request_id field when contacting Skyflow support — it uniquely identifies the request for faster diagnosis.