dbrepo.core.client package

Submodules

dbrepo.core.client.auth module

class dbrepo.core.client.auth.AuthServiceClient(endpoint: str, client_id: str, client_secret: str, jwt_public_key: str)

Bases: object

get_user_id(auth_header: str | None) -> (str | None, <class 'dbrepo.api.dto.ApiError'>, <class 'int'>)
get_user_roles(user: User) → List[str]
get_user_token(username: str, password: str) → str
is_valid_password(username: str, password: str) → Any
is_valid_token(token: str) → bool | User
verify_jwt(access_token: str) → User

dbrepo.core.client.dashboard module

class dbrepo.core.client.dashboard.DashboardServiceClient(endpoint: str, username: str, password: str, base_url: str = 'http://localhost', datasource_uid: str = 'dbrepojson0')

Bases: object

create(database_name: str, uid: str = '') → dict
delete(uid: str) → None
find(uid: str)

Finds a dashboard with the given uid.

@return The dashboard, if successful. Otherwise, None.

generic_get(api_url: str) → Response
generic_post(api_url: str, payload: dict) → Response
get_client()
get_panels(dashboard: dict, database: Database) → [<class 'dict'>]
map_columns_panel(database_id: str, view_id: str, x: int = 18, y: int = 0) → dict
map_data_sources_panel(database_id: str, x: int = 0, y: int = 1) → dict
map_histogram_panel(database_id: str, view: View, h: int = 8, w: int = 12, x: int = 12, y: int = 8) → dict
map_overview_panel(database_id: str, view_id: str, x: int = 0, y: int = 4) → dict
map_pie_panel(database_id: str, view: View, h: int = 8, w: int = 12, x: int = 12, y: int = 8) → dict
map_rows_panel(database_id: str, view_id: str, x: int = 18, y: int = 0) → dict
map_statistics_panel(database_id: str, view_id: str, w: int = 12, h: int = 8, x: int = 0, y: int = 8) → dict
map_timeseries_panel(database_id: str, view: View, h: int = 8, w: int = 12, x: int = 12, y: int = 8) → dict
update(database: Database) → None
update_anonymous_read_access(uid: str, is_public: bool, is_schema_public: bool) → None
dbrepo.core.client.dashboard.map_column_conversion(column: ViewColumn) → dict
dbrepo.core.client.dashboard.map_preview_image_panel(database_id: str, w: int = 4, h: int = 4, x: int = 20, y: int = 1) → dict
dbrepo.core.client.dashboard.map_row(title: str, x: int = 0, y: int = 0) → dict

dbrepo.core.client.search module

dbrepo.core.client.storage module

Module contents