relevanceai.client.helpers
#
Module Contents#
- relevanceai.client.helpers.region_to_url(region: str) str #
A function to convert a users region to base url for API calls
- Parameters
region (str) – user region, element of [“us-east-1”, “ap-southeast-2”, “old-australia-east”]
- Returns
the appropriate base url for API calls
- Return type
url
- class relevanceai.client.helpers.Credentials#
A convenience store of relevant credentials.
- token :str#
- project :str#
- api_key :str#
- region :str#
- firebase_uid :str#
- split_token(self) List[str] #
Splits the token in its four main components given in order by above
- Returns
a list of strings containing all user identification for interaction with dashboard and api calls
- Return type
List[str]
- dict(self) dict #
- relevanceai.client.helpers.process_token(token: str)#
Given a user token, checks to see if all necessary credentials are present in token.
- Parameters
token (str) – a “:” delimited string of identifying information
- Raises
TokenNotFoundError – error if idenitifier is not found
ProjectNotFoundError – error if idenitifier is not found
APIKeyNotFoundError – error if idenitifier is not found
RegionNotFoundError – error if idenitifier is not found
FireBaseUIDNotFoundError – error if idenitifier is not found
- Returns
a dataclass of all user identification
- Return type
- relevanceai.client.helpers.auth() str #
_summary_
- Returns
a “:” delimited string of identifying information
- Return type
token