dbrepo.core.api package¶
Submodules¶
dbrepo.core.api.dto module¶
- class dbrepo.core.api.dto.CreateDatasource(*, name: str, type: str, access: str, url: str, basicAuth: bool, version: int, readOnly: bool, jsonData: dict | None = None, secureJsonData: dict | None = None, basicAuthUser: str | None = None)¶
Bases:
BaseModel
- access: str¶
- basicAuth: bool¶
- basicAuthUser: str | None¶
- jsonData: dict | None¶
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'access': FieldInfo(annotation=str, required=True), 'basicAuth': FieldInfo(annotation=bool, required=True), 'basicAuthUser': FieldInfo(annotation=Union[str, NoneType], required=False), 'jsonData': FieldInfo(annotation=Union[dict, NoneType], required=False), 'name': FieldInfo(annotation=str, required=True), 'readOnly': FieldInfo(annotation=bool, required=True), 'secureJsonData': FieldInfo(annotation=Union[dict, NoneType], required=False), 'type': FieldInfo(annotation=str, required=True), 'url': FieldInfo(annotation=str, required=True), 'version': FieldInfo(annotation=int, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- name: str¶
- readOnly: bool¶
- secureJsonData: dict | None¶
- type: str¶
- url: str¶
- version: int¶
- class dbrepo.core.api.dto.CreateDatasourceRequest(*, database_internal_name: str, readonly: bool, type: str)¶
Bases:
BaseModel
- database_internal_name: str¶
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'database_internal_name': FieldInfo(annotation=str, required=True), 'readonly': FieldInfo(annotation=bool, required=True), 'type': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- readonly: bool¶
- type: str¶
- class dbrepo.core.api.dto.Datasource(*, uid: str, type: str, id: int | None = None, orgId: int | None = None, name: str | None = None, typeLogoUrl: str | None = None, access: str | None = None, url: str | None = None, user: str | None = None, basicAuth: bool | None = None, withCredentials: bool | None = None, isDefault: bool | None = None, version: int | None = None, readOnly: bool | None = None, jsonData: dict | None = None, secureJsonFields: dict | None = None, basicAuthUser: str | None = None, basicAuthPassword: str | None = None, password: str | None = None)¶
Bases:
BaseModel
- access: str | None¶
- basicAuth: bool | None¶
- basicAuthPassword: str | None¶
- basicAuthUser: str | None¶
- id: int | None¶
- isDefault: bool | None¶
- jsonData: dict | None¶
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'access': FieldInfo(annotation=Union[str, NoneType], required=False), 'basicAuth': FieldInfo(annotation=Union[bool, NoneType], required=False), 'basicAuthPassword': FieldInfo(annotation=Union[str, NoneType], required=False), 'basicAuthUser': FieldInfo(annotation=Union[str, NoneType], required=False), 'id': FieldInfo(annotation=Union[int, NoneType], required=False), 'isDefault': FieldInfo(annotation=Union[bool, NoneType], required=False), 'jsonData': FieldInfo(annotation=Union[dict, NoneType], required=False), 'name': FieldInfo(annotation=Union[str, NoneType], required=False), 'orgId': FieldInfo(annotation=Union[int, NoneType], required=False), 'password': FieldInfo(annotation=Union[str, NoneType], required=False), 'readOnly': FieldInfo(annotation=Union[bool, NoneType], required=False), 'secureJsonFields': FieldInfo(annotation=Union[dict, NoneType], required=False), 'type': FieldInfo(annotation=str, required=True), 'typeLogoUrl': FieldInfo(annotation=Union[str, NoneType], required=False), 'uid': FieldInfo(annotation=str, required=True), 'url': FieldInfo(annotation=Union[str, NoneType], required=False), 'user': FieldInfo(annotation=Union[str, NoneType], required=False), 'version': FieldInfo(annotation=Union[int, NoneType], required=False), 'withCredentials': FieldInfo(annotation=Union[bool, NoneType], required=False)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- name: str | None¶
- orgId: int | None¶
- password: str | None¶
- readOnly: bool | None¶
- secureJsonFields: dict | None¶
- type: str¶
- typeLogoUrl: str | None¶
- uid: str¶
- url: str | None¶
- user: str | None¶
- version: int | None¶
- withCredentials: bool | None¶
- class dbrepo.core.api.dto.Permission(*, permission: str)¶
Bases:
BaseModel
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'permission': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- permission: str¶
- class dbrepo.core.api.dto.User(*, id: str, username: str, roles: List[str])¶
Bases:
BaseModel
- id: str¶
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'id': FieldInfo(annotation=str, required=True), 'roles': FieldInfo(annotation=List[str], required=True), 'username': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- roles: List[str]¶
- username: str¶
dbrepo.core.api.exceptions module¶
- exception dbrepo.core.api.exceptions.DashboardNotFound¶
Bases:
Exception
The dashboard could not be found.