Skip to content

Commit 8e3e949

Browse files
SK-2415 Addressed co-pilot changes
1 parent f4f41d2 commit 8e3e949

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

docs/advanced_initialization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ credentials_string = json.dumps(skyflow_credentials) # Converts JSON object to
7171
# Step 5: Define secondary credentials (API key-based authentication as an example).
7272
# Demonstrates a different type of authentication mechanism for Skyflow vaults.
7373
secondary_credentials = {
74-
'token': '<BEARER_TOKEN>' # Replace with your API Key for authentication.
74+
'api_key': '<API_KEY>' # Replace with your API Key for authentication.
7575
}
7676

7777
# Step 6: Configure the secondary vault details.
@@ -86,7 +86,7 @@ secondary_vault_config = {
8686
# Step 7: Define tertiary credentials using a path to a credentials JSON file.
8787
# This method demonstrates an alternative authentication method.
8888
tertiary_credentials = {
89-
'token': '<BEARER_TOKEN>' # Replace with the path to your credentials file.
89+
'path': '<YOUR_CREDENTIALS_FILE_PATH>' # Replace with the path to your credentials file.
9090
}
9191

9292
# Step 8: Configure the tertiary vault details.

docs/migrate_to_v2.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ These options allow you to choose the authentication method that best suits your
1919
```python
2020
# User defined function to provide access token to the vault apis
2121
def token_provider():
22-
global bearerToken
23-
if !(is_expired(bearerToken)):
24-
return bearerToken
25-
bearerToken, _ = generate_bearer_token('<YOUR_CREDENTIALS_FILE_PATH>')
26-
return bearerToken
22+
global bearer_token
23+
if not is_expired(bearer_token):
24+
return bearer_token
25+
bearer_token, _ = generate_bearer_token('<YOUR_CREDENTIALS_FILE_PATH>')
26+
return bearer_token
2727
```
2828

2929
#### V2 (New): Passing one of the following:
@@ -44,7 +44,7 @@ credentials = {
4444

4545
# Option 4: Stringified JSON
4646
credentials = {
47-
'credentials_string': '<YOUR_CREDENTIALS_sTRING>', # Credentials as string
47+
'credentials_string': '<YOUR_CREDENTIALS_STRING>', # Credentials as string
4848
}
4949

5050
# Option 5: Bearer Token
@@ -95,13 +95,13 @@ client = (
9595
```
9696

9797
**Key Changes:**
98-
- `vault_url` replaced with `cluster_Id`.
98+
- `vault_url` replaced with `cluster_id`.
9999
- Added environment specification (`env`).
100100
- Instance-specific log levels.
101101

102102
### Request & Response Structure
103103

104-
In V2, with the introduction of constructor parameters, you can now pass parameters to `InsertRequest`. This request need
104+
In V2, with the introduction of constructor parameters, you can now pass parameters to `InsertRequest`. This request needs
105105
- **`table_name`**: The name of the table.
106106
- **`values`**: An array of objects containing the data to be inserted.
107107
The response will be of type `InsertResponse` class, which contains `inserted_fields` and errors.
@@ -230,7 +230,7 @@ The error response now includes:
230230

231231
#### V2 (New) Error Structure:
232232

233-
```typescript
233+
```python
234234
{
235235
"http_status": "<http_status>",
236236
"grpc_code": <grpc_code>,

0 commit comments

Comments
 (0)