Client
The client package contains functionality for user authentication and logging requests.
Auth
Username/Password authentication class for Firebolt Database.
Gets authentication token using provided credentials and updates it when it expires.
- param username
Username
- type username
str
- param password
Password
- type password
str
- param use_token_cache
True if token should be cached in filesystem; False otherwise
- type use_token_cache
bool
- firebolt.client.auth.username_password.UsernamePassword.username
Username
- Type
str
- firebolt.client.auth.username_password.UsernamePassword.password
Password
- Type
str
Token authentication class for Firebolt Database.
Uses provided token for authentication. Doesn’t cache token and doesn’t refresh it on expiration.
- param token
Authorization token
- type token
str
- firebolt.client.auth.token.Token.token
- Type
str
Client
- class firebolt.client.client.AsyncClient(*args: Any, account_name: Optional[str] = None, api_endpoint: str = 'api.app.firebolt.io', auth: Optional[Auth] = None, **kwargs: Any)
Bases:
FireboltClientMixin
,AsyncClient
An HTTP client, based on httpx.AsyncClient.
Asynchronously handles authentication for Firebolt database. Authentication can be passed through auth keyword as a tuple, or as a FireboltAuth instance.
- account_id
User account id.
If account_name was provided during AsyncClient construction, returns its ID; gets default account otherwise.
- Returns
Account ID
- Return type
str
- Raises
AccountNotFoundError – No account found with provided name
- class firebolt.client.client.Client(*args: Any, account_name: Optional[str] = None, api_endpoint: str = 'api.app.firebolt.io', auth: Optional[Auth] = None, **kwargs: Any)
Bases:
FireboltClientMixin
,Client
An HTTP client, based on httpx.Client.
Handles the authentication for Firebolt database. Authentication can be passed through auth keyword as a tuple or as a FireboltAuth instance
- property account_id: str
User account ID.
If account_name was provided during Client construction, returns its ID; gets default account otherwise.
- Returns
Account ID
- Return type
str
- Raises
AccountNotFoundError – No account found with provided name