-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SK-1649: Added logging and updated error messages
- Loading branch information
1 parent
4a4909b
commit 1a5eb20
Showing
24 changed files
with
452 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from ._utils import generate_bearer_token, generate_bearer_token_from_creds, is_expired | ||
from ._utils import generate_bearer_token, generate_bearer_token_from_creds, is_expired, validate_api_key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from ..utils.enums import LogLevel, Env | ||
from ._skyflow_messages import SkyflowMessages | ||
from ._version import SDK_VERSION | ||
from ._logger import Logger | ||
from ._log_helpers import log_error, log_info | ||
from ._utils import get_credentials, get_vault_url, get_client_configuration, get_base_url, format_scope, get_redaction_type, construct_invoke_connection_request, get_metrics, parse_insert_response, handle_exception, parse_update_record_response, parse_delete_response, parse_detokenize_response, parse_tokenize_response, parse_query_response, parse_get_response | ||
from ._helpers import get_base_url, format_scope | ||
from ._utils import get_credentials, get_vault_url, get_client_configuration, construct_invoke_connection_request, get_metrics, parse_insert_response, handle_exception, parse_update_record_response, parse_delete_response, parse_detokenize_response, parse_tokenize_response, parse_query_response, parse_get_response, parse_invoke_connection_response | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from urllib.parse import urlparse | ||
|
||
def get_base_url(url): | ||
parsed_url = urlparse(url) | ||
base_url = f"{parsed_url.scheme}://{parsed_url.netloc}" | ||
return base_url | ||
|
||
def format_scope(scopes): | ||
if not scopes: | ||
return None | ||
return " ".join([f"role:{scope}" for scope in scopes]) |
Oops, something went wrong.