firebolt.client package
firebolt.client.auth module
- class firebolt.client.auth.Auth(username: str, password: str, api_endpoint: str = 'api.app.firebolt.io')
Bases:
httpx.Auth
Authentication class for Firebolt database. Gets authentication token using provided credentials and updates it when it expires
- api_url
- auth_flow(request: httpx.Request) Generator[httpx.Request, httpx.Response, None]
Add authorization token to request headers. Overrides
httpx.Auth.auth_flow
- copy() firebolt.client.auth.Auth
- property expired: Optional[int]
- get_new_token_generator() Generator[httpx.Request, httpx.Response, None]
Get new token using username and password
- password
- requires_response_body = True
- property token: Optional[str]
- username
firebolt.client.client module
- class firebolt.client.client.AsyncClient(*args: Any, account_name: Optional[str] = None, api_endpoint: str = 'api.app.firebolt.io', auth: Optional[Union[Tuple[Union[bytes, str], Union[bytes, str]], Callable[[Request], Request], Auth]] = None, **kwargs: Any)
Bases:
firebolt.client.client.FireboltClientMixin
,httpx.AsyncClient
An http client, based on httpx.AsyncClient, that asyncronously handles authentication for Firebolt database.
Authentication can be passed through auth keyword as a tuple or as a FireboltAuth instance
httpx.AsyncClient:
(HttpxAsyncClient.__doc__ or “”)
- account_id
- class firebolt.client.client.Client(*args: Any, account_name: Optional[str] = None, api_endpoint: str = 'api.app.firebolt.io', auth: Optional[Union[Tuple[Union[bytes, str], Union[bytes, str]], Callable[[Request], Request], Auth]] = None, **kwargs: Any)
Bases:
firebolt.client.client.FireboltClientMixin
,httpx.Client
An http client, based on httpx.Client, that handles the authentication for Firebolt database.
Authentication can be passed through auth keyword as a tuple or as a FireboltAuth instance
httpx.Client:
(HttpxClient.__doc__ or “”)
- property account_id: str
firebolt.client.resource_manager_hooks module
- firebolt.client.resource_manager_hooks.log_request(request: httpx.Request) None
Hook to log http requests
- firebolt.client.resource_manager_hooks.log_response(response: httpx.Response) None
Hook to log responses to http requests
- firebolt.client.resource_manager_hooks.raise_on_4xx_5xx(response: httpx.Response) None
Hook to raise an error on http responses with codes indicating an error.
If an error is message is found raise as an ApiError