thanosql

Subpackages

Package Contents

Classes

ThanoSQL

Client for accessing the ThanoSQL engine.

class thanosql.ThanoSQL(api_token: str | None = None, engine_url: str | None = None, api_version: str = 'v1')[source]

Bases: thanosql._base_client.ThanoSQLBaseClient

Client for accessing the ThanoSQL engine.

Parameters:
  • api_token (str, optional) – The workspace/engine API token. If not supplied, will be retrieved from the THANOSQL_API_TOKEN environment variable.

  • engine_url (str, optional) – The workspace engine URL. If not supplied, will be retrieved from the THANOSQL_ENGINE_URL environment variable.

  • api_version (str, default "v1") – The version of the API used.

query

The service layer for query APIs.

Type:

QueryService

file

The service layer for file APIs.

Type:

FileService

schema

The service layer for schema APIs.

Type:

SchemaService

table

The service layer for table APIs.

Type:

TableService

view

The service layer for view APIs.

Type:

ViewService

Raises:

ThanoSQLValueError – If API token and/or engine URL is neither passed in as parameters nor set as environment variables.

property query: thanosql.resources.QueryService

Access the QueryService.

property file: thanosql.resources.FileService

Access the FileService.

property schema: thanosql.resources.SchemaService

Access the SchemaService.

property table: thanosql.resources.TableService

Access the TableService.

property view: thanosql.resources.ViewService

Access the ViewService.