dbrepo.api package¶
Submodules¶
dbrepo.api.dto module¶
- class dbrepo.api.dto.AccessType(value)¶
Bases:
str
,Enum
Enumeration of database access.
- READ = 'read'¶
The user can read all data.
- WRITE_ALL = 'write_all'¶
The user can write in all tables and read all data.
- WRITE_OWN = 'write_own'¶
The user can write into self-owned tables and read all data.
- class dbrepo.api.dto.AffiliationIdentifierSchemeType(value)¶
Bases:
str
,Enum
Enumeration of affiliation identifier scheme types.
- GRID = 'GRID'¶
- ISNI = 'ISNI'¶
- ROR = 'ROR'¶
- class dbrepo.api.dto.ApiError(*, status: str, message: str, code: str)¶
Bases:
BaseModel
- code: str¶
- message: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- status: str¶
- class dbrepo.api.dto.Column(*, id: str, name: str, database_id: str, table_id: str, ord: int, internal_name: str, is_null_allowed: bool, type: ~dbrepo.api.dto.ColumnType, alias: str | None = None, description: str | None = None, size: int | None = None, d: int | None = None, mean: float | None = None, median: float | None = None, concept: ~dbrepo.api.dto.ConceptBrief | None = None, unit: ~dbrepo.api.dto.UnitBrief | None = None, enums: ~typing.List[~dbrepo.api.dto.ColumnEnum] | None = <factory>, sets: ~typing.List[~dbrepo.api.dto.ColumnSet] | None = <factory>, index_length: int | None = None, length: int | None = None, data_length: int | None = None, max_data_length: int | None = None, num_rows: int | None = None, val_min: float | None = None, val_max: float | None = None, std_dev: float | None = None)¶
Bases:
BaseModel
- alias: str | None¶
- concept: ConceptBrief | None¶
- d: int | None¶
- data_length: int | None¶
- database_id: str¶
- description: str | None¶
- enums: List[ColumnEnum] | None¶
- id: str¶
- index_length: int | None¶
- internal_name: str¶
- is_null_allowed: bool¶
- length: int | None¶
- max_data_length: int | None¶
- mean: float | None¶
- median: float | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- num_rows: int | None¶
- ord: int¶
- size: int | None¶
- std_dev: float | None¶
- table_id: str¶
- type: ColumnType¶
- val_max: float | None¶
- val_min: float | None¶
- class dbrepo.api.dto.ColumnBrief(**data: Any)¶
Bases:
BaseModel
- alias: str | None¶
- database_id: str¶
- id: str¶
- internal_name: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- table_id: str¶
- type: ColumnType¶
- class dbrepo.api.dto.ColumnEnum(*, id: str, value: str)¶
Bases:
BaseModel
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- value: str¶
- class dbrepo.api.dto.ColumnSet(*, id: str, value: str)¶
Bases:
BaseModel
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- value: str¶
- class dbrepo.api.dto.ColumnStatistic(*, val_min: float, val_max: float, mean: float, median: float, std_dev: float)¶
Bases:
BaseModel
- mean: float¶
- median: float¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- std_dev: float¶
- val_max: float¶
- val_min: float¶
- class dbrepo.api.dto.ColumnType(value)¶
Bases:
str
,Enum
Enumeration of table column data types.
- BIGINT = 'bigint'¶
- BINARY = 'binary'¶
- BIT = 'bit'¶
- BLOB = 'blob'¶
- BOOL = 'bool'¶
- CHAR = 'char'¶
- DATE = 'date'¶
- DATETIME = 'datetime'¶
- DECIMAL = 'decimal'¶
- DOUBLE = 'double'¶
- ENUM = 'enum'¶
- FLOAT = 'float'¶
- INT = 'int'¶
- LONGBLOB = 'longblob'¶
- LONGTEXT = 'longtext'¶
- MEDIUMBLOB = 'mediumblob'¶
- MEDIUMINT = 'mediumint'¶
- MEDIUMTEXT = 'mediumtext'¶
- SERIAL = 'serial'¶
- SET = 'set'¶
- SMALLINT = 'smallint'¶
- TEXT = 'text'¶
- TIME = 'time'¶
- TIMESTAMP = 'timestamp'¶
- TINYBLOB = 'tinyblob'¶
- TINYINT = 'tinyint'¶
- TINYTEXT = 'tinytext'¶
- VARBINARY = 'varbinary'¶
- VARCHAR = 'varchar'¶
- YEAR = 'year'¶
- class dbrepo.api.dto.ConceptBrief(*, id: str, uri: str, name: str | None = None, description: str | None = None)¶
Bases:
BaseModel
- description: str | None¶
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str | None¶
- uri: str¶
- class dbrepo.api.dto.Constraints(*, uniques: List[Unique], foreign_keys: List[ForeignKey], checks: List[str], primary_key: List[PrimaryKey])¶
Bases:
BaseModel
- checks: List[str]¶
- foreign_keys: List[ForeignKey]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- primary_key: List[PrimaryKey]¶
- class dbrepo.api.dto.Container(**data: Any)¶
Bases:
BaseModel
- id: str¶
- internal_name: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- ui_host: str | None¶
- ui_port: int | None¶
- class dbrepo.api.dto.ContainerBrief(*, id: str, name: str, image: ImageBrief, internal_name: str, running: bool | None = None, hash: str | None = None)¶
Bases:
BaseModel
- hash: str | None¶
- id: str¶
- image: ImageBrief¶
- internal_name: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- running: bool | None¶
- class dbrepo.api.dto.CreateAccess(*, type: AccessType)¶
Bases:
BaseModel
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type: AccessType¶
- class dbrepo.api.dto.CreateContainer(*, name: str, host: str, image_id: str, privileged_username: str, privileged_password: str, ui_host: str | None = None, ui_port: int | None = None, port: int | None = None)¶
Bases:
BaseModel
- host: str¶
- image_id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- port: int | None¶
- privileged_password: str¶
- privileged_username: str¶
- ui_host: str | None¶
- ui_port: int | None¶
- class dbrepo.api.dto.CreateDatabase(*, name: str, container_id: str, is_public: bool, is_schema_public: bool)¶
Bases:
BaseModel
- container_id: str¶
- is_public: bool¶
- is_schema_public: bool¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- class dbrepo.api.dto.CreateForeignKey(*, columns: List[str], referenced_table: str, referenced_columns: List[str], on_update: ReferenceType | None = None, on_delete: ReferenceType | None = None)¶
Bases:
BaseModel
- columns: List[str]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- on_delete: ReferenceType | None¶
- on_update: ReferenceType | None¶
- referenced_columns: List[str]¶
- referenced_table: str¶
- class dbrepo.api.dto.CreateIdentifier(**data: Any)¶
Bases:
BaseModel
- creators: List[CreateIdentifierCreator]¶
- database_id: str¶
- descriptions: List[CreateIdentifierDescription]¶
- doi: str | None¶
- execution: str | None¶
- funders: List[CreateIdentifierFunder] | None¶
- language: str | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- publication_day: int | None¶
- publication_month: int | None¶
- publication_year: int¶
- publisher: str¶
- query: str | None¶
- query_id: str | None¶
- query_normalized: str | None¶
- result_hash: str | None¶
- result_number: int | None¶
- table_id: str | None¶
- titles: List[CreateIdentifierTitle]¶
- type: IdentifierType¶
- view_id: str | None¶
- class dbrepo.api.dto.CreateIdentifierCreator(*, creator_name: str, firstname: str | None = None, lastname: str | None = None, affiliation: str | None = None, name_type: str | None = None, name_identifier: str | None = None, name_identifier_scheme: str | None = None, name_identifier_scheme_uri: str | None = None, affiliation_identifier: str | None = None, affiliation_identifier_scheme: str | None = None, affiliation_identifier_scheme_uri: str | None = None)¶
Bases:
BaseModel
- affiliation: str | None¶
- affiliation_identifier: str | None¶
- affiliation_identifier_scheme: str | None¶
- affiliation_identifier_scheme_uri: str | None¶
- creator_name: str¶
- firstname: str | None¶
- lastname: str | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name_identifier: str | None¶
- name_identifier_scheme: str | None¶
- name_identifier_scheme_uri: str | None¶
- name_type: str | None¶
- class dbrepo.api.dto.CreateIdentifierDescription(**data: Any)¶
Bases:
BaseModel
- description: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type: DescriptionType | None¶
- class dbrepo.api.dto.CreateIdentifierFunder(*, funder_name: str, funder_identifier: str | None = None, funder_identifier_type: str | None = None, scheme_uri: str | None = None, award_number: str | None = None, award_title: str | None = None)¶
Bases:
BaseModel
- award_number: str | None¶
- award_title: str | None¶
- funder_identifier: str | None¶
- funder_identifier_type: str | None¶
- funder_name: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- scheme_uri: str | None¶
- class dbrepo.api.dto.CreateIdentifierTitle(**data: Any)¶
Bases:
BaseModel
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- title: str¶
- class dbrepo.api.dto.CreateRelatedIdentifier(**data: Any)¶
Bases:
BaseModel
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- relation: RelatedIdentifierRelation¶
- type: RelatedIdentifierType¶
- value: str¶
- class dbrepo.api.dto.CreateTable(**data: Any)¶
Bases:
BaseModel
- columns: List[CreateTableColumn]¶
- constraints: CreateTableConstraints¶
- description: str | None¶
- is_public: bool¶
- is_schema_public: bool¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- class dbrepo.api.dto.CreateTableColumn(*, name: str, type: ColumnType, null_allowed: bool, description: str | None = None, concept_uri: str | None = None, unit_uri: str | None = None, index_length: int | None = None, size: int | None = None, d: int | None = None, enums: List[str] | None = None, sets: List[str] | None = None)¶
Bases:
BaseModel
- concept_uri: str | None¶
- d: int | None¶
- description: str | None¶
- enums: List[str] | None¶
- index_length: int | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- null_allowed: bool¶
- sets: List[str] | None¶
- size: int | None¶
- type: ColumnType¶
- unit_uri: str | None¶
- class dbrepo.api.dto.CreateTableConstraints(**data: Any)¶
Bases:
BaseModel
- checks: List[str]¶
- foreign_keys: List[CreateForeignKey]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- primary_key: List[str]¶
- uniques: List[List[str]]¶
- class dbrepo.api.dto.CreateUser(*, username: str, email: str, password: str)¶
Bases:
BaseModel
- email: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- password: str¶
- username: str¶
- class dbrepo.api.dto.CreateView(**data: Any)¶
Bases:
BaseModel
- is_public: bool¶
- is_schema_public: bool¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- class dbrepo.api.dto.Creator(*, id: str, creator_name: str, firstname: str | None = None, lastname: str | None = None, affiliation: str | None = None, name_type: str | None = None, name_identifier: str | None = None, name_identifier_scheme: NameIdentifierSchemeType | None = None, name_identifier_scheme_uri: str | None = None, affiliation_identifier: str | None = None, affiliation_identifier_scheme: str | None = None, affiliation_identifier_scheme_uri: str | None = None)¶
Bases:
BaseModel
- affiliation: str | None¶
- affiliation_identifier: str | None¶
- affiliation_identifier_scheme: str | None¶
- affiliation_identifier_scheme_uri: str | None¶
- creator_name: str¶
- firstname: str | None¶
- id: str¶
- lastname: str | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name_identifier: str | None¶
- name_identifier_scheme: NameIdentifierSchemeType | None¶
- name_identifier_scheme_uri: str | None¶
- name_type: str | None¶
- class dbrepo.api.dto.CreatorBrief(*, id: str, creator_name: str, affiliation: str | None = None, name_type: str | None = None, name_identifier: str | None = None, name_identifier_scheme: NameIdentifierSchemeType | None = None, affiliation_identifier: str | None = None, affiliation_identifier_scheme: str | None = None)¶
Bases:
BaseModel
- affiliation: str | None¶
- affiliation_identifier: str | None¶
- affiliation_identifier_scheme: str | None¶
- creator_name: str¶
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name_identifier: str | None¶
- name_identifier_scheme: NameIdentifierSchemeType | None¶
- name_type: str | None¶
- class dbrepo.api.dto.DataType(*, id: str, display_name: str, value: str, documentation: str, is_quoted: bool, is_buildable: bool, size_min: int | None = None, size_max: int | None = None, size_default: int | None = None, size_required: bool | None = None, d_min: int | None = None, d_max: int | None = None, d_default: int | None = None, d_required: bool | None = None, data_hint: str | None = None, type_hint: str | None = None)¶
Bases:
BaseModel
- d_default: int | None¶
- d_max: int | None¶
- d_min: int | None¶
- d_required: bool | None¶
- data_hint: str | None¶
- display_name: str¶
- documentation: str¶
- id: str¶
- is_buildable: bool¶
- is_quoted: bool¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- size_default: int | None¶
- size_max: int | None¶
- size_min: int | None¶
- size_required: bool | None¶
- type_hint: str | None¶
- value: str¶
- class dbrepo.api.dto.Database(**data: Any)¶
Bases:
BaseModel
- accesses: List[DatabaseAccess] | None¶
- container: ContainerBrief¶
- description: str | None¶
- exchange_name: str | None¶
- id: str¶
- identifiers: List[Identifier] | None¶
- internal_name: str¶
- is_public: bool¶
- is_schema_public: bool¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- preview_image: str | None¶
- subsets: List[Identifier] | None¶
- class dbrepo.api.dto.DatabaseAccess(*, type: AccessType, user: UserBrief)¶
Bases:
BaseModel
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type: AccessType¶
- class dbrepo.api.dto.DatabaseBrief(*, id: str, name: str, contact: ~dbrepo.api.dto.UserBrief, owner_id: str, internal_name: str, is_public: bool, is_schema_public: bool, identifiers: ~typing.List[~dbrepo.api.dto.IdentifierBrief] | None = <factory>, preview_image: str | None = None, description: str | None = None)¶
Bases:
BaseModel
- description: str | None¶
- id: str¶
- identifiers: List[IdentifierBrief] | None¶
- internal_name: str¶
- is_public: bool¶
- is_schema_public: bool¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- owner_id: str¶
- preview_image: str | None¶
- class dbrepo.api.dto.DatatypeAnalysis(*, separator: str, columns: dict[str, ColumnType], line_termination: str | None = None)¶
Bases:
BaseModel
- columns: dict[str, ColumnType]¶
- line_termination: str | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- separator: str¶
- class dbrepo.api.dto.DescriptionType(value)¶
Bases:
str
,Enum
Enumeration of identifier description types.
- ABSTRACT = 'Abstract'¶
- METHODS = 'Methods'¶
- OTHER = 'Other'¶
- SERIES_INFORMATION = 'SeriesInformation'¶
- TABLE_OF_CONTENTS = 'TableOfContents'¶
- TECHNICAL_INFO = 'TechnicalInfo'¶
- class dbrepo.api.dto.Filter(*, type: FilterType, column_id: str, operator_id: str, value: str)¶
Bases:
BaseModel
- column_id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- operator_id: str¶
- type: FilterType¶
- value: str¶
- class dbrepo.api.dto.FilterDefinition(*, type: FilterType, column: str, operator: str, value: str)¶
Bases:
BaseModel
- column: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- operator: str¶
- type: FilterType¶
- value: str¶
- class dbrepo.api.dto.FilterType(value)¶
Bases:
str
,Enum
Enumeration of filter types.
- AND = 'and'¶
- OR = 'or'¶
- WHERE = 'where'¶
- class dbrepo.api.dto.ForeignKey(*, id: str, name: str, references: List[ForeignKeyReference], table: TableBrief, referenced_table: TableBrief, on_update: ReferenceType | None = None, on_delete: ReferenceType | None = None)¶
Bases:
BaseModel
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- on_delete: ReferenceType | None¶
- on_update: ReferenceType | None¶
- referenced_table: TableBrief¶
- references: List[ForeignKeyReference]¶
- table: TableBrief¶
- class dbrepo.api.dto.ForeignKeyBrief(*, id: str)¶
Bases:
BaseModel
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dbrepo.api.dto.ForeignKeyReference(**data: Any)¶
Bases:
BaseModel
- column: ColumnBrief¶
- foreign_key: ForeignKeyBrief¶
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- referenced_column: ColumnBrief¶
- class dbrepo.api.dto.History(**data: Any)¶
Bases:
BaseModel
- event: HistoryEventType¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timestamp: Timestamp¶
- total: int¶
- class dbrepo.api.dto.HistoryEventType(value)¶
Bases:
str
,Enum
Enumeration of history event types.
- DELETE = 'delete'¶
- INSERT = 'insert'¶
- class dbrepo.api.dto.Identifier(**data: Any)¶
Bases:
BaseModel
- database_id: str¶
- descriptions: List[IdentifierDescription]¶
- doi: str | None¶
- execution: str | None¶
- funders: List[IdentifierFunder] | None¶
- id: str¶
- language: str | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- publication_day: int | None¶
- publication_month: int | None¶
- publication_year: int¶
- publisher: str¶
- query: str | None¶
- query_id: str | None¶
- query_normalized: str | None¶
- result_hash: str | None¶
- result_number: int | None¶
- status: IdentifierStatusType¶
- table_id: str | None¶
- titles: List[IdentifierTitle]¶
- type: IdentifierType¶
- view_id: str | None¶
- class dbrepo.api.dto.IdentifierBrief(**data: Any)¶
Bases:
BaseModel
- database_id: str¶
- doi: str | None¶
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- owned_by: str¶
- publication_year: int¶
- publisher: str¶
- query_id: str | None¶
- status: IdentifierStatusType¶
- table_id: str | None¶
- titles: List[IdentifierTitle]¶
- type: IdentifierType¶
- view_id: str | None¶
- class dbrepo.api.dto.IdentifierDescription(**data: Any)¶
Bases:
BaseModel
- description: str¶
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type: DescriptionType | None¶
- class dbrepo.api.dto.IdentifierFunder(*, id: str, funder_name: str, funder_identifier: str | None = None, funder_identifier_type: str | None = None, scheme_uri: str | None = None, award_number: str | None = None, award_title: str | None = None)¶
Bases:
BaseModel
- award_number: str | None¶
- award_title: str | None¶
- funder_identifier: str | None¶
- funder_identifier_type: str | None¶
- funder_name: str¶
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- scheme_uri: str | None¶
- class dbrepo.api.dto.IdentifierSave(*, database_id: str, type: ~dbrepo.api.dto.IdentifierType, creators: ~typing.List[~dbrepo.api.dto.CreateIdentifierCreator], publication_year: int, publisher: str, titles: ~typing.List[~dbrepo.api.dto.CreateIdentifierTitle], descriptions: ~typing.List[~dbrepo.api.dto.CreateIdentifierDescription], funders: ~typing.List[~dbrepo.api.dto.CreateIdentifierFunder] | None = <factory>, doi: str | None = None, language: str | None = None, licenses: ~typing.List[~dbrepo.api.dto.License] | None = <factory>, query_id: str | None = None, table_id: str | None = None, view_id: str | None = None, query: str | None = None, query_normalized: str | None = None, execution: str | None = None, related_identifiers: ~typing.List[~dbrepo.api.dto.CreateRelatedIdentifier] | None = <factory>, result_hash: str | None = None, result_number: int | None = None, publication_day: int | None = None, publication_month: int | None = None)¶
Bases:
CreateIdentifier
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dbrepo.api.dto.IdentifierStatusType(value)¶
Bases:
str
,Enum
Enumeration of identifier status types.
- DRAFT = 'draft'¶
The identifier is a draft and can still be edited.
- PUBLISHED = 'published'¶
The identifier is published and immutable.
- class dbrepo.api.dto.IdentifierTitle(**data: Any)¶
Bases:
BaseModel
Title of an identifier. See external documentation: https://support.datacite.org/docs/datacite-metadata-schema-v44-mandatory-properties#3-title.
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- title: str¶
- class dbrepo.api.dto.IdentifierType(value)¶
Bases:
str
,Enum
Enumeration of identifier types.
- DATABASE = 'database'¶
The identifier is identifying a database.
- SUBSET = 'subset'¶
The identifier is identifying a subset.
- TABLE = 'table'¶
The identifier is identifying a table.
- VIEW = 'view'¶
The identifier is identifying a view.
- class dbrepo.api.dto.Image(**data: Any)¶
Bases:
BaseModel
- default: bool¶
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- version: str¶
- class dbrepo.api.dto.ImageBrief(*, id: str, name: str, version: str, default: bool)¶
Bases:
BaseModel
- default: bool¶
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- version: str¶
- class dbrepo.api.dto.Import(*, location: str, separator: str, header: bool, quote: str | None = None, line_termination: str | None = None)¶
Bases:
BaseModel
- header: bool¶
- line_termination: str | None¶
- location: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- quote: str | None¶
- separator: str¶
- class dbrepo.api.dto.KeyAnalysis(*, keys: dict[str, int])¶
Bases:
BaseModel
- keys: dict[str, int]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dbrepo.api.dto.Language(value)¶
Bases:
str
,Enum
Enumeration of languages.
- AA = 'aa'¶
- AB = 'ab'¶
- AE = 'ae'¶
- AF = 'af'¶
- AK = 'ak'¶
- AM = 'am'¶
- AN = 'an'¶
- AR = 'ar'¶
- AS = 'as'¶
- AV = 'av'¶
- AY = 'ay'¶
- AZ = 'az'¶
- BA = 'ba'¶
- BE = 'be'¶
- BG = 'bg'¶
- BH = 'bh'¶
- BI = 'bi'¶
- BM = 'bm'¶
- BN = 'bn'¶
- BO = 'bo'¶
- BR = 'br'¶
- BS = 'bs'¶
- CA = 'ca'¶
- CE = 'ce'¶
- CH = 'ch'¶
- CO = 'co'¶
- CR = 'cr'¶
- CS = 'cs'¶
- CU = 'cu'¶
- CV = 'cv'¶
- CY = 'cy'¶
- DA = 'da'¶
- DE = 'de'¶
- DV = 'dv'¶
- DZ = 'dz'¶
- EE = 'ee'¶
- EL = 'el'¶
- EN = 'en'¶
- EO = 'eo'¶
- ES = 'es'¶
- ET = 'et'¶
- EU = 'eu'¶
- FA = 'fa'¶
- FF = 'ff'¶
- FI = 'fi'¶
- FJ = 'fj'¶
- FO = 'fo'¶
- FR = 'fr'¶
- FY = 'fy'¶
- GA = 'ga'¶
- GD = 'gd'¶
- GL = 'gl'¶
- GN = 'gn'¶
- GU = 'gu'¶
- GV = 'gv'¶
- HA = 'ha'¶
- HE = 'he'¶
- HI = 'hi'¶
- HO = 'ho'¶
- HR = 'hr'¶
- HT = 'ht'¶
- HU = 'hu'¶
- HY = 'hy'¶
- HZ = 'hz'¶
- IA = 'ia'¶
- ID = 'id'¶
- IE = 'ie'¶
- IG = 'ig'¶
- II = 'ii'¶
- IK = 'ik'¶
- IO = 'io'¶
- IS = 'is'¶
- IT = 'it'¶
- IU = 'iu'¶
- JA = 'ja'¶
- JV = 'jv'¶
- KA = 'ka'¶
- KG = 'kg'¶
- KI = 'ki'¶
- KJ = 'kj'¶
- KK = 'kk'¶
- KL = 'kl'¶
- KM = 'km'¶
- KN = 'kn'¶
- KO = 'ko'¶
- KR = 'kr'¶
- KS = 'ks'¶
- KU = 'ku'¶
- KV = 'kv'¶
- KW = 'kw'¶
- KY = 'ky'¶
- LA = 'la'¶
- LB = 'lb'¶
- LG = 'lg'¶
- LI = 'li'¶
- LN = 'ln'¶
- LO = 'lo'¶
- LT = 'lt'¶
- LU = 'lu'¶
- LV = 'lv'¶
- MG = 'mg'¶
- MH = 'mh'¶
- MI = 'mi'¶
- MK = 'mk'¶
- ML = 'ml'¶
- MN = 'mn'¶
- MR = 'mr'¶
- MS = 'ms'¶
- MT = 'mt'¶
- MY = 'my'¶
- NA = 'na'¶
- NB = 'nb'¶
- ND = 'nd'¶
- NE = 'ne'¶
- NG = 'ng'¶
- NL = 'nl'¶
- NN = 'nn'¶
- NO = 'no'¶
- NR = 'nr'¶
- NV = 'nv'¶
- NY = 'ny'¶
- OC = 'oc'¶
- OJ = 'oj'¶
- OM = 'om'¶
- OR = 'or'¶
- OS = 'os'¶
- PA = 'pa'¶
- PI = 'pi'¶
- PL = 'pl'¶
- PS = 'ps'¶
- PT = 'pt'¶
- QU = 'qu'¶
- RM = 'rm'¶
- RN = 'rn'¶
- RO = 'ro'¶
- RU = 'ru'¶
- RW = 'rw'¶
- SA = 'sa'¶
- SC = 'sc'¶
- SD = 'sd'¶
- SE = 'se'¶
- SG = 'sg'¶
- SI = 'si'¶
- SK = 'sk'¶
- SL = 'sl'¶
- SM = 'sm'¶
- SN = 'sn'¶
- SO = 'so'¶
- SQ = 'sq'¶
- SR = 'sr'¶
- SS = 'ss'¶
- ST = 'st'¶
- SU = 'su'¶
- SV = 'sv'¶
- SW = 'sw'¶
- TA = 'ta'¶
- TE = 'te'¶
- TG = 'tg'¶
- TH = 'th'¶
- TI = 'ti'¶
- TK = 'tk'¶
- TL = 'tl'¶
- TN = 'tn'¶
- TO = 'to'¶
- TR = 'tr'¶
- TS = 'ts'¶
- TT = 'tt'¶
- TW = 'tw'¶
- TY = 'ty'¶
- UG = 'ug'¶
- UK = 'uk'¶
- UR = 'ur'¶
- UZ = 'uz'¶
- VE = 've'¶
- VI = 'vi'¶
- VO = 'vo'¶
- WA = 'wa'¶
- WO = 'wo'¶
- XH = 'xh'¶
- YI = 'yi'¶
- YO = 'yo'¶
- ZA = 'za'¶
- ZH = 'zh'¶
- ZU = 'zu'¶
- class dbrepo.api.dto.License(*, identifier: str, uri: str, description: str)¶
Bases:
BaseModel
- description: str¶
- identifier: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- uri: str¶
- class dbrepo.api.dto.Links(*, self: str, self_html: str, data: str | None = None)¶
Bases:
BaseModel
- data: str | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- self: str¶
- self_html: str¶
- class dbrepo.api.dto.Message(*, id: str, type: str, link: str | None = None, link_text: str | None = None, display_start: ~datetime.Annotated[~datetime.datetime, ~pydantic.functional_serializers.PlainSerializer(func=~dbrepo.api.dto.<lambda>, return_type=str, when_used=always)] | None = None, display_end: ~datetime.Annotated[~datetime.datetime, ~pydantic.functional_serializers.PlainSerializer(func=~dbrepo.api.dto.<lambda>, return_type=str, when_used=always)] | None = None)¶
Bases:
BaseModel
- display_end: Timestamp | None¶
- display_start: Timestamp | None¶
- id: str¶
- link: str | None¶
- link_text: str | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type: str¶
- class dbrepo.api.dto.ModifyOwner(*, id: str)¶
Bases:
BaseModel
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dbrepo.api.dto.ModifyVisibility(*, is_public: bool, is_schema_public: bool)¶
Bases:
BaseModel
- is_public: bool¶
- is_schema_public: bool¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dbrepo.api.dto.NameIdentifierSchemeType(value)¶
Bases:
str
,Enum
Enumeration of name identifier scheme types.
- GRID = 'GRID'¶
- ISNI = 'ISNI'¶
- ORCID = 'ORCID'¶
- ROR = 'ROR'¶
- class dbrepo.api.dto.OntologyBrief(*, id: str, uri: str, prefix: str, sparql: bool, rdf: bool, uri_pattern: str | None = None)¶
Bases:
BaseModel
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- prefix: str¶
- rdf: bool¶
- sparql: bool¶
- uri: str¶
- uri_pattern: str | None¶
- class dbrepo.api.dto.Operator(*, id: str, display_name: str, value: str, documentation: str)¶
Bases:
BaseModel
- display_name: str¶
- documentation: str¶
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- value: str¶
- class dbrepo.api.dto.Order(*, column_id: str, direction: OrderType | None = None)¶
Bases:
BaseModel
- column_id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dbrepo.api.dto.OrderDefinition(*, column: str, direction: OrderType | None = None)¶
Bases:
BaseModel
- column: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dbrepo.api.dto.OrderType(value)¶
Bases:
str
,Enum
Enumeration of order types.
- ASC = 'asc'¶
- DESC = 'desc'¶
- class dbrepo.api.dto.PrimaryKey(*, id: str, table: TableBrief, column: ColumnBrief)¶
Bases:
BaseModel
- column: ColumnBrief¶
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- table: TableBrief¶
- class dbrepo.api.dto.Query(*, id: str, owner: ~dbrepo.api.dto.UserBrief, execution: ~datetime.Annotated[~datetime.datetime, ~pydantic.functional_serializers.PlainSerializer(func=~dbrepo.api.dto.<lambda>, return_type=str, when_used=always)], query: str, type: ~dbrepo.api.dto.QueryType, database_id: str, query_hash: str, is_persisted: bool, result_hash: str, query_normalized: str, result_number: int | None = None, identifiers: ~typing.List[~dbrepo.api.dto.IdentifierBrief] = <factory>)¶
Bases:
BaseModel
- database_id: str¶
- execution: Timestamp¶
- id: str¶
- identifiers: List[IdentifierBrief]¶
- is_persisted: bool¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- query: str¶
- query_hash: str¶
- query_normalized: str¶
- result_hash: str¶
- result_number: int | None¶
- class dbrepo.api.dto.QueryDefinition(*, table: str, columns: List[str], filter: List[FilterDefinition] | None = None, order: List[OrderDefinition] | None = None)¶
Bases:
BaseModel
- columns: List[str]¶
- filter: List[FilterDefinition] | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- order: List[OrderDefinition] | None¶
- table: str¶
- class dbrepo.api.dto.QueryType(value)¶
Bases:
str
,Enum
Enumeration of query types.
- QUERY = 'query'¶
The query was executed as subset.
- VIEW = 'view'¶
The query was executed as part of a view.
- class dbrepo.api.dto.ReferenceType(value)¶
Bases:
str
,Enum
Enumeration of reference types.
- CASCADE = 'cascade'¶
- NO_ACTION = 'no_action'¶
- RESTRICT = 'restrict'¶
- SET_DEFAULT = 'set_default'¶
- SET_NULL = 'set_null'¶
- class dbrepo.api.dto.RelatedIdentifier(**data: Any)¶
Bases:
BaseModel
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- relation: RelatedIdentifierRelation¶
- type: RelatedIdentifierType¶
- value: str¶
- class dbrepo.api.dto.RelatedIdentifierRelation(value)¶
Bases:
str
,Enum
Enumeration of related identifier types.
- CITES = 'Cites'¶
- COMPILES = 'Compiles'¶
- CONTINUES = 'Continues'¶
- DESCRIBES = 'Describes'¶
- DOCUMENTS = 'Documents'¶
- HAS_METADATA = 'HasMetadata'¶
- HAS_PART = 'HasPart'¶
- HAS_VERSION = 'HasVersion'¶
- IS_CITED_BY = 'IsCitedBy'¶
- IS_COMPILED_BY = 'IsCompiledBy'¶
- IS_CONTINUED_BY = 'IsContinuedBy'¶
- IS_DERIVED_FROM = 'IsDerivedFrom'¶
- IS_DESCRIBED_BY = 'IsDescribedBy'¶
- IS_DOCUMENTED_BY = 'IsDocumentedBy'¶
- IS_IDENTICAL_TO = 'IsIdenticalTo'¶
- IS_METADATA_FOR = 'IsMetadataFor'¶
- IS_NEW_VERSION_OF = 'IsNewVersionOf'¶
- IS_OBSOLETED_BY = 'IsObsoletedBy'¶
- IS_ORIGINAL_FORM_OF = 'IsOriginalFormOf'¶
- IS_PART_OF = 'IsPartOf'¶
- IS_PREVIOUS_VERSION_OF = 'IsPreviousVersionOf'¶
- IS_PUBLISHED_IN = 'IsPublishedIn'¶
- IS_REFERENCED_BY = 'IsReferencedBy'¶
- IS_REQUIRED_BY = 'IsRequiredBy'¶
- IS_REVIEWED_BY = 'IsReviewedBy'¶
- IS_SOURCE_OF = 'IsSourceOf'¶
- IS_SUPPLEMENTED_BY = 'IsSupplementedBy'¶
- IS_SUPPLEMENT_TO = 'IsSupplementTo'¶
- IS_VARIANT_FORM_OF = 'IsVariantFormOf'¶
- IS_VERSION_OF = 'IsVersionOf'¶
- OBSOLETES = 'Obsoletes'¶
- REFERENCES = 'References'¶
- REQUIRES = 'Requires'¶
- REVIEWS = 'Reviews'¶
- class dbrepo.api.dto.RelatedIdentifierType(value)¶
Bases:
str
,Enum
Enumeration of related identifier types.
- ARK = 'ARK'¶
- ARXIV = 'arXiv'¶
- BIBCODE = 'bibcode'¶
- DOI = 'DOI'¶
- EAN13 = 'EAN13'¶
- EISSN = 'EISSN'¶
- HANDLE = 'Handle'¶
- IGSN = 'IGSN'¶
- ISBN = 'ISBN'¶
- ISTC = 'ISTC'¶
- LISSN = 'LISSN'¶
- LSID = 'LSID'¶
- PMID = 'PMID'¶
- PURL = 'PURL'¶
- UPC = 'UPC'¶
- URL = 'URL'¶
- URN = 'URN'¶
- W3ID = 'w3id'¶
- class dbrepo.api.dto.SaveIdentifierCreator(*, creator_name: str, firstname: str | None = None, lastname: str | None = None, affiliation: str | None = None, name_type: str | None = None, name_identifier: str | None = None, name_identifier_scheme: str | None = None, name_identifier_scheme_uri: str | None = None, affiliation_identifier: str | None = None, affiliation_identifier_scheme: str | None = None, affiliation_identifier_scheme_uri: str | None = None, id: str)¶
Bases:
CreateIdentifierCreator
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dbrepo.api.dto.SaveIdentifierDescription(*, description: str, language: Language | None = None, type: DescriptionType | None = None)¶
Bases:
CreateIdentifierDescription
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dbrepo.api.dto.SaveIdentifierFunder(*, funder_name: str, funder_identifier: str | None = None, funder_identifier_type: str | None = None, scheme_uri: str | None = None, award_number: str | None = None, award_title: str | None = None, id: str)¶
Bases:
CreateIdentifierFunder
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dbrepo.api.dto.SaveIdentifierTitle(*, title: str, language: Language | None = None, type: TitleType | None = None)¶
Bases:
CreateIdentifierTitle
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dbrepo.api.dto.SaveRelatedIdentifier(*, value: str, type: RelatedIdentifierType, relation: RelatedIdentifierRelation)¶
Bases:
CreateRelatedIdentifier
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dbrepo.api.dto.Subset(*, table_id: str, columns: List[str], filter: List[Filter] | None = None, order: List[Order] | None = None)¶
Bases:
BaseModel
- columns: List[str]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- table_id: str¶
- class dbrepo.api.dto.Table(**data: Any)¶
Bases:
BaseModel
- avg_row_length: int | None¶
- constraints: Constraints¶
- data_length: int | None¶
- database_id: str¶
- description: str | None¶
- id: str¶
- identifiers: List[Identifier] | None¶
- internal_name: str¶
- is_public: bool¶
- is_schema_public: bool¶
- is_versioned: bool¶
- max_data_length: int | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- num_rows: int | None¶
- queue_name: str¶
- queue_type: str | None¶
- routing_key: str¶
- class dbrepo.api.dto.TableBrief(*, id: str, database_id: str, name: str, description: str | None = None, internal_name: str, is_versioned: bool, is_public: bool, is_schema_public: bool, owned_by: str)¶
Bases:
BaseModel
- database_id: str¶
- description: str | None¶
- id: str¶
- internal_name: str¶
- is_public: bool¶
- is_schema_public: bool¶
- is_versioned: bool¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- owned_by: str¶
- class dbrepo.api.dto.TableStatistics(*, columns: dict[str, ColumnStatistic])¶
Bases:
BaseModel
- columns: dict[str, ColumnStatistic]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dbrepo.api.dto.TitleType(value)¶
Bases:
str
,Enum
Enumeration of identifier title types.
- ALTERNATIVE_TITLE = 'AlternativeTitle'¶
- OTHER = 'Other'¶
- SUBTITLE = 'Subtitle'¶
- TRANSLATED_TITLE = 'TranslatedTitle'¶
- class dbrepo.api.dto.Tuple(*, data: dict)¶
Bases:
BaseModel
- data: dict¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dbrepo.api.dto.TupleDelete(*, keys: dict)¶
Bases:
BaseModel
- keys: dict¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dbrepo.api.dto.TupleUpdate(*, data: dict, keys: dict)¶
Bases:
BaseModel
- data: dict¶
- keys: dict¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dbrepo.api.dto.Unique(*, id: str, table: TableBrief, columns: List[ColumnBrief])¶
Bases:
BaseModel
- columns: List[ColumnBrief]¶
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- table: TableBrief¶
- class dbrepo.api.dto.UnitBrief(*, id: str, uri: str, name: str | None = None, description: str | None = None)¶
Bases:
BaseModel
- description: str | None¶
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str | None¶
- uri: str¶
- class dbrepo.api.dto.UpdateAccess(*, type: AccessType)¶
Bases:
BaseModel
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type: AccessType¶
- class dbrepo.api.dto.UpdateColumn(*, concept_uri: str | None = None, unit_uri: str | None = None)¶
Bases:
BaseModel
- concept_uri: str | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- unit_uri: str | None¶
- class dbrepo.api.dto.UpdateQuery(*, persist: bool)¶
Bases:
BaseModel
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- persist: bool¶
- class dbrepo.api.dto.UpdateUser(*, theme: str, language: str, firstname: str | None = None, lastname: str | None = None, affiliation: str | None = None, orcid: str | None = None)¶
Bases:
BaseModel
- affiliation: str | None¶
- firstname: str | None¶
- language: str¶
- lastname: str | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- orcid: str | None¶
- theme: str¶
- class dbrepo.api.dto.UpdateUserPassword(*, password: str)¶
Bases:
BaseModel
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- password: str¶
- class dbrepo.api.dto.UpdateUserTheme(*, theme: str)¶
Bases:
BaseModel
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- theme: str¶
- class dbrepo.api.dto.UpdateView(*, is_public: bool, is_schema_public: bool)¶
Bases:
BaseModel
- is_public: bool¶
- is_schema_public: bool¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dbrepo.api.dto.UploadResponse(*, s3_key: str)¶
Bases:
BaseModel
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- s3_key: str¶
- class dbrepo.api.dto.User(*, id: str, username: str, attributes: UserAttributes, qualified_name: str | None = None, given_name: str | None = None, family_name: str | None = None, name: str | None = None)¶
Bases:
BaseModel
- attributes: UserAttributes¶
- family_name: str | None¶
- given_name: str | None¶
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str | None¶
- qualified_name: str | None¶
- username: str¶
- class dbrepo.api.dto.UserAttributes(*, theme: str, language: str, orcid: str | None = None, affiliation: str | None = None)¶
Bases:
BaseModel
- affiliation: str | None¶
- language: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- orcid: str | None¶
- theme: str¶
- class dbrepo.api.dto.UserBrief(*, id: str, username: str, name: str | None = None, orcid: str | None = None, qualified_name: str | None = None, given_name: str | None = None, family_name: str | None = None)¶
Bases:
BaseModel
- family_name: str | None¶
- given_name: str | None¶
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str | None¶
- orcid: str | None¶
- qualified_name: str | None¶
- username: str¶
- class dbrepo.api.dto.View(**data: Any)¶
Bases:
BaseModel
- columns: List[ViewColumn]¶
- database_id: str¶
- id: str¶
- identifiers: List[Identifier]¶
- initial_view: bool¶
- internal_name: str¶
- is_public: bool¶
- is_schema_public: bool¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- query: str¶
- query_hash: str¶
- class dbrepo.api.dto.ViewBrief(*, id: str, database_id: str, name: str, internal_name: str, is_public: bool, is_schema_public: bool, initial_view: bool, query: str, query_hash: str, owned_by: str)¶
Bases:
BaseModel
- database_id: str¶
- id: str¶
- initial_view: bool¶
- internal_name: str¶
- is_public: bool¶
- is_schema_public: bool¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- owned_by: str¶
- query: str¶
- query_hash: str¶
- class dbrepo.api.dto.ViewColumn(*, id: str, name: str, ord: int, database_id: str, internal_name: str, type: ColumnType, is_null_allowed: bool, alias: str | None = None, size: int | None = None, d: int | None = None, mean: float | None = None, median: float | None = None, concept: ConceptBrief | None = None, unit: UnitBrief | None = None, index_length: int | None = None, length: int | None = None)¶
Bases:
BaseModel
- alias: str | None¶
- concept: ConceptBrief | None¶
- d: int | None¶
- database_id: str¶
- id: str¶
- index_length: int | None¶
- internal_name: str¶
- is_null_allowed: bool¶
- length: int | None¶
- mean: float | None¶
- median: float | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- ord: int¶
- size: int | None¶
- type: ColumnType¶
dbrepo.api.exceptions module¶
- exception dbrepo.api.exceptions.AuthenticationError¶
Bases:
Exception
The action requires authentication.
- exception dbrepo.api.exceptions.EmailExistsError¶
Bases:
Exception
The e-mail address is already in use by another user.
- exception dbrepo.api.exceptions.ExternalSystemError¶
Bases:
Exception
The service could not communicate with the external system.
- exception dbrepo.api.exceptions.ForbiddenError¶
Bases:
Exception
The action is not allows.
- exception dbrepo.api.exceptions.FormatNotAvailable¶
Bases:
Exception
The service cannot provide the result in the requested representation.
- exception dbrepo.api.exceptions.MalformedError¶
Bases:
Exception
The data is malformed.
- exception dbrepo.api.exceptions.MetadataConsistencyError¶
Bases:
Exception
The service expected metadata that is not present.
- exception dbrepo.api.exceptions.NameExistsError¶
Bases:
Exception
The resource with this name exists.
- exception dbrepo.api.exceptions.NotExistsError¶
Bases:
Exception
The resource was not found.
- exception dbrepo.api.exceptions.QueryStoreError¶
Bases:
Exception
The data is malformed.
- exception dbrepo.api.exceptions.RequestError¶
Bases:
Exception
The request cannot be sent.
- exception dbrepo.api.exceptions.ResponseCodeError¶
Bases:
Exception
The response code is different from the expected one.
- exception dbrepo.api.exceptions.ServiceConnectionError¶
Bases:
Exception
The service failed to establish connection.
- exception dbrepo.api.exceptions.ServiceError¶
Bases:
Exception
The service failed to perform the requested action.
- exception dbrepo.api.exceptions.UploadError¶
Bases:
Exception
The upload was not successful.
- exception dbrepo.api.exceptions.UsernameExistsError¶
Bases:
Exception
The username is already in use by another user.