dbrepo.api package¶
Submodules¶
dbrepo.api.dto module¶
- class dbrepo.api.dto.AccessType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
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.ApiError(*, status: str, message: str, code: str)¶
Bases:
BaseModel
- code: str¶
- message: 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]] = {'code': FieldInfo(annotation=str, required=True), 'message': FieldInfo(annotation=str, required=True), 'status': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- status: str¶
- class dbrepo.api.dto.Column(*, id: int, name: str, database_id: int, table_id: int, internal_name: str, column_type: ColumnType, is_public: bool, is_null_allowed: bool, 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: Concept | None = None, unit: Unit | None = None, enums: List[str] | None = None, sets: List[str] | None = None, 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¶
- column_type: ColumnType¶
- d: int | None¶
- data_length: int | None¶
- database_id: int¶
- description: str | None¶
- enums: List[str] | None¶
- id: int¶
- index_length: int | None¶
- internal_name: str¶
- is_null_allowed: bool¶
- is_public: bool¶
- length: int | None¶
- max_data_length: int | None¶
- mean: float | None¶
- median: float | 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]] = {'alias': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'column_type': FieldInfo(annotation=ColumnType, required=True), 'concept': FieldInfo(annotation=Union[Concept, NoneType], required=False, default=None), 'd': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'data_length': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'database_id': FieldInfo(annotation=int, required=True), 'description': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'enums': FieldInfo(annotation=Union[List[str], NoneType], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'id': FieldInfo(annotation=int, required=True), 'index_length': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'internal_name': FieldInfo(annotation=str, required=True), 'is_null_allowed': FieldInfo(annotation=bool, required=True), 'is_public': FieldInfo(annotation=bool, required=True), 'length': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'max_data_length': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'mean': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'median': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'name': FieldInfo(annotation=str, required=True), 'num_rows': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'sets': FieldInfo(annotation=Union[List[str], NoneType], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'size': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'std_dev': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'table_id': FieldInfo(annotation=int, required=True), 'unit': FieldInfo(annotation=Union[Unit, NoneType], required=False, default=None), 'val_max': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'val_min': FieldInfo(annotation=Union[float, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: str¶
- num_rows: int | None¶
- sets: List[str] | None¶
- size: int | None¶
- std_dev: float | None¶
- table_id: int¶
- val_max: float | None¶
- val_min: float | None¶
- class dbrepo.api.dto.ColumnBrief(**data: Any)¶
Bases:
BaseModel
- alias: str¶
- column_type: ColumnType¶
- database_id: int¶
- id: int¶
- 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]] = {'alias': FieldInfo(annotation=str, required=True), 'column_type': FieldInfo(annotation=ColumnType, required=True), 'database_id': FieldInfo(annotation=int, required=True), 'id': FieldInfo(annotation=int, required=True), 'internal_name': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True), 'table_id': FieldInfo(annotation=int, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: str¶
- table_id: int¶
- class dbrepo.api.dto.ColumnMinimal(*, id: int, table_id: int, database_id: int)¶
Bases:
BaseModel
- database_id: int¶
- id: int¶
- 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_id': FieldInfo(annotation=int, required=True), 'id': FieldInfo(annotation=int, required=True), 'table_id': FieldInfo(annotation=int, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- table_id: int¶
- 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_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]] = {'mean': FieldInfo(annotation=float, required=True), 'median': FieldInfo(annotation=float, required=True), 'std_dev': FieldInfo(annotation=float, required=True), 'val_max': FieldInfo(annotation=float, required=True), 'val_min': FieldInfo(annotation=float, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- std_dev: float¶
- val_max: float¶
- val_min: float¶
- class dbrepo.api.dto.ColumnType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
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.Concept(*, id: int, uri: str, created: ~datetime.Annotated[~datetime.datetime, ~pydantic.functional_serializers.PlainSerializer(func=~dbrepo.api.dto.<lambda>, return_type=str, when_used=always)], name: str | None = None, description: str | None = None)¶
Bases:
BaseModel
- created: Timestamp¶
- description: str | None¶
- id: int¶
- 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]] = {'created': FieldInfo(annotation=datetime, required=True, metadata=[PlainSerializer(func=<function <lambda>>, return_type=<class 'str'>, when_used='always')]), 'description': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'id': FieldInfo(annotation=int, required=True), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'uri': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- 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_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]] = {'checks': FieldInfo(annotation=List[str], required=True), 'foreign_keys': FieldInfo(annotation=List[ForeignKey], required=True), 'primary_key': FieldInfo(annotation=List[PrimaryKey], required=True), 'uniques': FieldInfo(annotation=List[Unique], required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- primary_key: List[PrimaryKey]¶
- class dbrepo.api.dto.Container(**data: Any)¶
Bases:
BaseModel
- created: Timestamp¶
- host: str¶
- id: int¶
- 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]] = {'created': FieldInfo(annotation=datetime, required=True, metadata=[PlainSerializer(func=<function <lambda>>, return_type=<class 'str'>, when_used='always')]), 'host': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=int, required=True), 'image': FieldInfo(annotation=Image, required=True), 'internal_name': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True), 'port': FieldInfo(annotation=int, required=True), 'sidecar_host': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'sidecar_port': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'ui_host': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'ui_port': FieldInfo(annotation=Union[int, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: str¶
- port: int¶
- sidecar_host: str | None¶
- sidecar_port: int | None¶
- ui_host: str | None¶
- ui_port: int | None¶
- class dbrepo.api.dto.ContainerBrief(*, id: int, name: str, image: ~dbrepo.api.dto.ImageBrief, created: ~datetime.Annotated[~datetime.datetime, ~pydantic.functional_serializers.PlainSerializer(func=~dbrepo.api.dto.<lambda>, return_type=str, when_used=always)], internal_name: str, running: bool | None = None, hash: str | None = None)¶
Bases:
BaseModel
- created: Timestamp¶
- hash: str | None¶
- id: int¶
- image: ImageBrief¶
- 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]] = {'created': FieldInfo(annotation=datetime, required=True, metadata=[PlainSerializer(func=<function <lambda>>, return_type=<class 'str'>, when_used='always')]), 'hash': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'id': FieldInfo(annotation=int, required=True), 'image': FieldInfo(annotation=ImageBrief, required=True), 'internal_name': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True), 'running': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: str¶
- running: bool | None¶
- class dbrepo.api.dto.CreateAccess(*, type: AccessType)¶
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]] = {'type': FieldInfo(annotation=AccessType, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- type: AccessType¶
- class dbrepo.api.dto.CreateContainer(*, name: str, host: str, image_id: int, sidecar_host: str, sidecar_port: int, 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: int¶
- 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]] = {'host': FieldInfo(annotation=str, required=True), 'image_id': FieldInfo(annotation=int, required=True), 'name': FieldInfo(annotation=str, required=True), 'port': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'privileged_password': FieldInfo(annotation=str, required=True), 'privileged_username': FieldInfo(annotation=str, required=True), 'sidecar_host': FieldInfo(annotation=str, required=True), 'sidecar_port': FieldInfo(annotation=int, required=True), 'ui_host': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'ui_port': FieldInfo(annotation=Union[int, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: str¶
- port: int | None¶
- privileged_password: str¶
- privileged_username: str¶
- sidecar_host: str¶
- sidecar_port: int¶
- ui_host: str | None¶
- ui_port: int | None¶
- class dbrepo.api.dto.CreateData(*, data: dict)¶
Bases:
BaseModel
- data: dict¶
- 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]] = {'data': FieldInfo(annotation=dict, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class dbrepo.api.dto.CreateDatabase(*, name: str, container_id: int, is_public: bool)¶
Bases:
BaseModel
- container_id: int¶
- is_public: bool¶
- 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]] = {'container_id': FieldInfo(annotation=int, required=True), 'is_public': FieldInfo(annotation=bool, required=True), 'name': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- 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_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]] = {'columns': FieldInfo(annotation=List[str], required=True), 'on_delete': FieldInfo(annotation=Union[ReferenceType, NoneType], required=False, default=None), 'on_update': FieldInfo(annotation=Union[ReferenceType, NoneType], required=False, default=None), 'referenced_columns': FieldInfo(annotation=List[str], required=True), 'referenced_table': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- 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: int¶
- descriptions: List[CreateIdentifierDescription]¶
- doi: str | None¶
- execution: str | None¶
- funders: List[CreateIdentifierFunder] | None¶
- language: str | 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]] = {'creators': FieldInfo(annotation=List[CreateIdentifierCreator], required=True), 'database_id': FieldInfo(annotation=int, required=True), 'descriptions': FieldInfo(annotation=List[CreateIdentifierDescription], required=True), 'doi': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'execution': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'funders': FieldInfo(annotation=Union[List[CreateIdentifierFunder], NoneType], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'language': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'licenses': FieldInfo(annotation=Union[List[License], NoneType], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'publication_day': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'publication_month': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'publication_year': FieldInfo(annotation=int, required=True), 'publisher': FieldInfo(annotation=str, required=True), 'query': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'query_id': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'query_normalized': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'related_identifiers': FieldInfo(annotation=Union[List[CreateRelatedIdentifier], NoneType], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'result_hash': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'result_number': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'table_id': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'titles': FieldInfo(annotation=List[CreateIdentifierTitle], required=True), 'type': FieldInfo(annotation=IdentifierType, required=True), 'view_id': FieldInfo(annotation=Union[int, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- publication_day: int | None¶
- publication_month: int | None¶
- publication_year: int¶
- publisher: str¶
- query: str | None¶
- query_id: int | None¶
- query_normalized: str | None¶
- result_hash: str | None¶
- result_number: int | None¶
- table_id: int | None¶
- titles: List[CreateIdentifierTitle]¶
- type: IdentifierType¶
- view_id: int | 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_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]] = {'affiliation': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'affiliation_identifier': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'affiliation_identifier_scheme': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'affiliation_identifier_scheme_uri': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'creator_name': FieldInfo(annotation=str, required=True), 'firstname': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'lastname': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'name_identifier': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'name_identifier_scheme': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'name_identifier_scheme_uri': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'name_type': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- 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_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]] = {'description': FieldInfo(annotation=str, required=True), 'language': FieldInfo(annotation=Union[Language, NoneType], required=False, default=None), 'type': FieldInfo(annotation=Union[DescriptionType, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- 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_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]] = {'award_number': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'award_title': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'funder_identifier': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'funder_identifier_type': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'funder_name': FieldInfo(annotation=str, required=True), 'scheme_uri': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- scheme_uri: str | None¶
- class dbrepo.api.dto.CreateIdentifierTitle(**data: Any)¶
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]] = {'language': FieldInfo(annotation=Union[Language, NoneType], required=False, default=None), 'title': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Union[TitleType, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- title: str¶
- class dbrepo.api.dto.CreateRelatedIdentifier(**data: Any)¶
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]] = {'relation': FieldInfo(annotation=RelatedIdentifierRelation, required=True), 'type': FieldInfo(annotation=RelatedIdentifierType, required=True), 'value': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- relation: RelatedIdentifierRelation¶
- type: RelatedIdentifierType¶
- value: str¶
- class dbrepo.api.dto.CreateTable(**data: Any)¶
Bases:
BaseModel
- columns: List[CreateTableColumn]¶
- constraints: CreateTableConstraints¶
- description: str | 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]] = {'columns': FieldInfo(annotation=List[CreateTableColumn], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'constraints': FieldInfo(annotation=CreateTableConstraints, required=True), 'description': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'name': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: str¶
- class dbrepo.api.dto.CreateTableColumn(*, name: str, type: ColumnType, null_allowed: bool, 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¶
- enums: List[str] | None¶
- index_length: int | 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]] = {'concept_uri': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'd': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'enums': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None), 'index_length': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'name': FieldInfo(annotation=str, required=True), 'null_allowed': FieldInfo(annotation=bool, required=True), 'sets': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None), 'size': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'type': FieldInfo(annotation=ColumnType, required=True), 'unit_uri': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- 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_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]] = {'checks': FieldInfo(annotation=List[str], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'foreign_keys': FieldInfo(annotation=List[CreateForeignKey], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'primary_key': FieldInfo(annotation=List[str], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'uniques': FieldInfo(annotation=List[List[str]], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- primary_key: List[str]¶
- uniques: List[List[str]]¶
- class dbrepo.api.dto.CreateUser(*, username: str, email: str, password: str)¶
Bases:
BaseModel
- email: 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]] = {'email': FieldInfo(annotation=str, required=True), 'password': FieldInfo(annotation=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] objects.
This replaces Model.__fields__ from Pydantic V1.
- password: str¶
- username: str¶
- class dbrepo.api.dto.CreateView(*, name: str, query: str, is_public: bool)¶
Bases:
BaseModel
- is_public: bool¶
- 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]] = {'is_public': FieldInfo(annotation=bool, required=True), 'name': FieldInfo(annotation=str, required=True), 'query': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: str¶
- query: str¶
- class dbrepo.api.dto.DataType(*, 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¶
- is_buildable: bool¶
- is_quoted: bool¶
- 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]] = {'d_default': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'd_max': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'd_min': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'd_required': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'data_hint': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'display_name': FieldInfo(annotation=str, required=True), 'documentation': FieldInfo(annotation=str, required=True), 'is_buildable': FieldInfo(annotation=bool, required=True), 'is_quoted': FieldInfo(annotation=bool, required=True), 'size_default': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'size_max': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'size_min': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'size_required': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'type_hint': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'value': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- 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¶
- created: Timestamp¶
- description: str | None¶
- exchange_name: str¶
- exchange_type: str | None¶
- id: int¶
- identifiers: List[Identifier] | None¶
- image: str | None¶
- internal_name: str¶
- is_public: bool¶
- 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]] = {'accesses': FieldInfo(annotation=Union[List[DatabaseAccess], NoneType], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'contact': FieldInfo(annotation=User, required=True), 'container': FieldInfo(annotation=Container, required=True), 'created': FieldInfo(annotation=datetime, required=True, metadata=[PlainSerializer(func=<function <lambda>>, return_type=<class 'str'>, when_used='always')]), 'creator': FieldInfo(annotation=User, required=True), 'description': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'exchange_name': FieldInfo(annotation=str, required=True), 'exchange_type': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'id': FieldInfo(annotation=int, required=True), 'identifiers': FieldInfo(annotation=Union[List[Identifier], NoneType], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'image': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'internal_name': FieldInfo(annotation=str, required=True), 'is_public': FieldInfo(annotation=bool, required=True), 'name': FieldInfo(annotation=str, required=True), 'owner': FieldInfo(annotation=User, required=True), 'subsets': FieldInfo(annotation=Union[List[Identifier], NoneType], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'tables': FieldInfo(annotation=Union[List[Table], NoneType], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'views': FieldInfo(annotation=Union[List[View], NoneType], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: str¶
- subsets: List[Identifier] | None¶
- class dbrepo.api.dto.DatabaseAccess(*, type: ~dbrepo.api.dto.AccessType, user: ~dbrepo.api.dto.User, created: ~datetime.Annotated[~datetime.datetime, ~pydantic.functional_serializers.PlainSerializer(func=~dbrepo.api.dto.<lambda>, return_type=str, when_used=always)])¶
Bases:
BaseModel
- created: Timestamp¶
- 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]] = {'created': FieldInfo(annotation=datetime, required=True, metadata=[PlainSerializer(func=<function <lambda>>, return_type=<class 'str'>, when_used='always')]), 'type': FieldInfo(annotation=AccessType, required=True), 'user': FieldInfo(annotation=User, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- type: AccessType¶
- class dbrepo.api.dto.DatabaseBrief(*, id: int, name: str, internal_name: str, description: str | None = None, is_public: bool, identifiers: ~typing.List[~dbrepo.api.dto.Identifier] | None = None, contact: ~dbrepo.api.dto.UserBrief, owner: ~dbrepo.api.dto.UserBrief, created: ~datetime.Annotated[~datetime.datetime, ~pydantic.functional_serializers.PlainSerializer(func=~dbrepo.api.dto.<lambda>, return_type=str, when_used=always)])¶
Bases:
BaseModel
- created: Timestamp¶
- description: str | None¶
- id: int¶
- identifiers: List[Identifier] | None¶
- internal_name: str¶
- is_public: bool¶
- 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]] = {'contact': FieldInfo(annotation=UserBrief, required=True), 'created': FieldInfo(annotation=datetime, required=True, metadata=[PlainSerializer(func=<function <lambda>>, return_type=<class 'str'>, when_used='always')]), 'description': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'id': FieldInfo(annotation=int, required=True), 'identifiers': FieldInfo(annotation=Union[List[Identifier], NoneType], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'internal_name': FieldInfo(annotation=str, required=True), 'is_public': FieldInfo(annotation=bool, required=True), 'name': FieldInfo(annotation=str, required=True), 'owner': FieldInfo(annotation=UserBrief, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: str¶
- 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_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]] = {'columns': FieldInfo(annotation=dict[str, ColumnType], required=True), 'line_termination': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'separator': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- separator: str¶
- class dbrepo.api.dto.DeleteData(*, keys: dict)¶
Bases:
BaseModel
- keys: dict¶
- 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]] = {'keys': FieldInfo(annotation=dict, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class dbrepo.api.dto.DescriptionType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
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.ExecuteQuery(*, statement: 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]] = {'statement': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- statement: str¶
- class dbrepo.api.dto.ForeignKey(*, id: int, name: str, references: List[ForeignKeyReference], table: TableMinimal, referenced_table: TableMinimal, on_update: ReferenceType | None = None, on_delete: ReferenceType | None = None)¶
Bases:
BaseModel
- id: int¶
- 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=int, required=True), 'name': FieldInfo(annotation=str, required=True), 'on_delete': FieldInfo(annotation=Union[ReferenceType, NoneType], required=False, default=None), 'on_update': FieldInfo(annotation=Union[ReferenceType, NoneType], required=False, default=None), 'referenced_table': FieldInfo(annotation=TableMinimal, required=True), 'references': FieldInfo(annotation=List[ForeignKeyReference], required=True), 'table': FieldInfo(annotation=TableMinimal, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: str¶
- on_delete: ReferenceType | None¶
- on_update: ReferenceType | None¶
- referenced_table: TableMinimal¶
- references: List[ForeignKeyReference]¶
- table: TableMinimal¶
- class dbrepo.api.dto.ForeignKeyMinimal(*, id: int)¶
Bases:
BaseModel
- id: int¶
- 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=int, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class dbrepo.api.dto.ForeignKeyReference(**data: Any)¶
Bases:
BaseModel
- column: ColumnMinimal¶
- foreign_key: ForeignKeyMinimal¶
- id: int¶
- 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]] = {'column': FieldInfo(annotation=ColumnMinimal, required=True), 'foreign_key': FieldInfo(annotation=ForeignKeyMinimal, required=True), 'id': FieldInfo(annotation=int, required=True), 'referenced_column': FieldInfo(annotation=ColumnMinimal, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- referenced_column: ColumnMinimal¶
- class dbrepo.api.dto.Identifier(**data: Any)¶
Bases:
BaseModel
- created: Timestamp¶
- creators: List[IdentifierCreator]¶
- database_id: int¶
- descriptions: List[IdentifierDescription]¶
- doi: str | None¶
- execution: str | None¶
- funders: List[IdentifierFunder] | None¶
- id: int¶
- language: str | None¶
- last_modified: Timestamp¶
- 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]] = {'created': FieldInfo(annotation=datetime, required=True, metadata=[PlainSerializer(func=<function <lambda>>, return_type=<class 'str'>, when_used='always')]), 'creator': FieldInfo(annotation=UserBrief, required=True), 'creators': FieldInfo(annotation=List[IdentifierCreator], required=True), 'database_id': FieldInfo(annotation=int, required=True), 'descriptions': FieldInfo(annotation=List[IdentifierDescription], required=True), 'doi': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'execution': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'funders': FieldInfo(annotation=Union[List[IdentifierFunder], NoneType], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'id': FieldInfo(annotation=int, required=True), 'language': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'last_modified': FieldInfo(annotation=datetime, required=True, metadata=[PlainSerializer(func=<function <lambda>>, return_type=<class 'str'>, when_used='always')]), 'licenses': FieldInfo(annotation=Union[List[License], NoneType], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'publication_day': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'publication_month': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'publication_year': FieldInfo(annotation=int, required=True), 'publisher': FieldInfo(annotation=str, required=True), 'query': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'query_id': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'query_normalized': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'related_identifiers': FieldInfo(annotation=Union[List[RelatedIdentifier], NoneType], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'result_hash': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'result_number': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'status': FieldInfo(annotation=IdentifierStatusType, required=True), 'table_id': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'titles': FieldInfo(annotation=List[IdentifierTitle], required=True), 'type': FieldInfo(annotation=IdentifierType, required=True), 'view_id': FieldInfo(annotation=Union[int, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- publication_day: int | None¶
- publication_month: int | None¶
- publication_year: int¶
- publisher: str¶
- query: str | None¶
- query_id: int | None¶
- query_normalized: str | None¶
- result_hash: str | None¶
- result_number: int | None¶
- status: IdentifierStatusType¶
- table_id: int | None¶
- titles: List[IdentifierTitle]¶
- type: IdentifierType¶
- view_id: int | None¶
- class dbrepo.api.dto.IdentifierCreator(*, id: int, 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¶
- id: int¶
- lastname: str | 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]] = {'affiliation': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'affiliation_identifier': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'affiliation_identifier_scheme': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'affiliation_identifier_scheme_uri': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'creator_name': FieldInfo(annotation=str, required=True), 'firstname': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'id': FieldInfo(annotation=int, required=True), 'lastname': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'name_identifier': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'name_identifier_scheme': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'name_identifier_scheme_uri': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'name_type': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name_identifier: str | None¶
- name_identifier_scheme: str | None¶
- name_identifier_scheme_uri: str | None¶
- name_type: str | None¶
- class dbrepo.api.dto.IdentifierDescription(**data: Any)¶
Bases:
BaseModel
- description: str¶
- id: int¶
- 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]] = {'description': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=int, required=True), 'language': FieldInfo(annotation=Union[Language, NoneType], required=False, default=None), 'type': FieldInfo(annotation=Union[DescriptionType, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- type: DescriptionType | None¶
- class dbrepo.api.dto.IdentifierFunder(*, id: int, 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: int¶
- 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]] = {'award_number': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'award_title': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'funder_identifier': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'funder_identifier_type': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'funder_name': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=int, required=True), 'scheme_uri': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- scheme_uri: str | None¶
- class dbrepo.api.dto.IdentifierStatusType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
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: int¶
- 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=int, required=True), 'language': FieldInfo(annotation=Union[Language, NoneType], required=False, default=None), 'title': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Union[TitleType, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- title: str¶
- class dbrepo.api.dto.IdentifierType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
str
,Enum
Enumeration of identifier types.
- DATABASE = 'database'¶
The identifier identifies a database.
- SUBSET = 'subset'¶
The identifier identifies a subset.
- TABLE = 'table'¶
The identifier identifies a table.
- VIEW = 'view'¶
The identifier identifies a view.
- class dbrepo.api.dto.Image(**data: Any)¶
Bases:
BaseModel
- default_port: int¶
- dialect: str¶
- driver_class: str¶
- id: int¶
- jdbc_method: 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]] = {'data_types': FieldInfo(annotation=List[DataType], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'default_port': FieldInfo(annotation=int, required=True), 'dialect': FieldInfo(annotation=str, required=True), 'driver_class': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=int, required=True), 'jdbc_method': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True), 'registry': FieldInfo(annotation=str, required=True), 'version': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: str¶
- registry: str¶
- version: str¶
- class dbrepo.api.dto.ImageBrief(*, id: int, name: str, version: str, jdbc_method: str)¶
Bases:
BaseModel
- id: int¶
- jdbc_method: 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=int, required=True), 'jdbc_method': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True), 'version': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: str¶
- version: str¶
- class dbrepo.api.dto.Import(*, location: str, separator: str, quote: str | None = None, skip_lines: int | None = None, line_termination: str | None = None)¶
Bases:
BaseModel
- line_termination: str | None¶
- location: 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]] = {'line_termination': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'location': FieldInfo(annotation=str, required=True), 'quote': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'separator': FieldInfo(annotation=str, required=True), 'skip_lines': FieldInfo(annotation=Union[int, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- quote: str | None¶
- separator: str¶
- skip_lines: int | None¶
- class dbrepo.api.dto.JwtAuth(*, access_token: str, refresh_token: str, id_token: str, expires_in: int, refresh_expires_in: int, not_before_policy: int, scope: str, session_state: str, token_type: str)¶
Bases:
BaseModel
- access_token: str¶
- expires_in: int¶
- id_token: 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]] = {'access_token': FieldInfo(annotation=str, required=True), 'expires_in': FieldInfo(annotation=int, required=True), 'id_token': FieldInfo(annotation=str, required=True), 'not_before_policy': FieldInfo(annotation=int, required=True, alias='not-before-policy', alias_priority=2), 'refresh_expires_in': FieldInfo(annotation=int, required=True), 'refresh_token': FieldInfo(annotation=str, required=True), 'scope': FieldInfo(annotation=str, required=True), 'session_state': FieldInfo(annotation=str, required=True), 'token_type': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- not_before_policy: int¶
- refresh_expires_in: int¶
- refresh_token: str¶
- scope: str¶
- session_state: str¶
- token_type: str¶
- class dbrepo.api.dto.KeyAnalysis(*, keys: dict[str, int])¶
Bases:
BaseModel
- keys: dict[str, int]¶
- 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]] = {'keys': FieldInfo(annotation=dict[str, int], required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class dbrepo.api.dto.Language(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
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_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]] = {'description': FieldInfo(annotation=str, required=True), 'identifier': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- uri: str¶
- class dbrepo.api.dto.ModifyOwner(*, id: 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)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class dbrepo.api.dto.ModifyVisibility(*, is_public: bool)¶
Bases:
BaseModel
- is_public: bool¶
- 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]] = {'is_public': FieldInfo(annotation=bool, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class dbrepo.api.dto.PrimaryKey(*, id: int, table: TableMinimal, column: ColumnMinimal)¶
Bases:
BaseModel
- column: ColumnMinimal¶
- id: int¶
- 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]] = {'column': FieldInfo(annotation=ColumnMinimal, required=True), 'id': FieldInfo(annotation=int, required=True), 'table': FieldInfo(annotation=TableMinimal, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- table: TableMinimal¶
- class dbrepo.api.dto.Query(*, id: int, creator: ~dbrepo.api.dto.User, 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, created: ~datetime.Annotated[~datetime.datetime, ~pydantic.functional_serializers.PlainSerializer(func=~dbrepo.api.dto.<lambda>, return_type=str, when_used=always)], database_id: int, query_hash: str, is_persisted: bool, result_hash: str, query_normalized: str, last_modified: ~datetime.Annotated[~datetime.datetime, ~pydantic.functional_serializers.PlainSerializer(func=~dbrepo.api.dto.<lambda>, return_type=str, when_used=always)], result_number: int | None = None, identifiers: ~typing.List[~dbrepo.api.dto.Identifier] = None)¶
Bases:
BaseModel
- created: Timestamp¶
- database_id: int¶
- execution: Timestamp¶
- id: int¶
- identifiers: List[Identifier]¶
- is_persisted: bool¶
- last_modified: Timestamp¶
- 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]] = {'created': FieldInfo(annotation=datetime, required=True, metadata=[PlainSerializer(func=<function <lambda>>, return_type=<class 'str'>, when_used='always')]), 'creator': FieldInfo(annotation=User, required=True), 'database_id': FieldInfo(annotation=int, required=True), 'execution': FieldInfo(annotation=datetime, required=True, metadata=[PlainSerializer(func=<function <lambda>>, return_type=<class 'str'>, when_used='always')]), 'id': FieldInfo(annotation=int, required=True), 'identifiers': FieldInfo(annotation=List[Identifier], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'is_persisted': FieldInfo(annotation=bool, required=True), 'last_modified': FieldInfo(annotation=datetime, required=True, metadata=[PlainSerializer(func=<function <lambda>>, return_type=<class 'str'>, when_used='always')]), 'query': FieldInfo(annotation=str, required=True), 'query_hash': FieldInfo(annotation=str, required=True), 'query_normalized': FieldInfo(annotation=str, required=True), 'result_hash': FieldInfo(annotation=str, required=True), 'result_number': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'type': FieldInfo(annotation=QueryType, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- query: str¶
- query_hash: str¶
- query_normalized: str¶
- result_hash: str¶
- result_number: int | None¶
- class dbrepo.api.dto.QueryType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
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, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
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: int¶
- 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=int, required=True), 'relation': FieldInfo(annotation=RelatedIdentifierRelation, required=True), 'type': FieldInfo(annotation=RelatedIdentifierType, required=True), 'value': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- relation: RelatedIdentifierRelation¶
- type: RelatedIdentifierType¶
- value: str¶
- class dbrepo.api.dto.RelatedIdentifierRelation(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
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, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
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.Result(*, result: Any, headers: Any, id: int | None = None)¶
Bases:
BaseModel
- headers: Any¶
- id: int | 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]] = {'headers': FieldInfo(annotation=Any, required=True), 'id': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'result': FieldInfo(annotation=Any, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- result: Any¶
- class dbrepo.api.dto.Table(**data: Any)¶
Bases:
BaseModel
- avg_row_length: int | None¶
- constraints: Constraints¶
- created: Timestamp¶
- created_by: str¶
- data_length: int | None¶
- database_id: int¶
- description: str | None¶
- id: int¶
- identifiers: List[Identifier] | None¶
- internal_name: str¶
- is_public: bool¶
- is_versioned: bool¶
- max_data_length: int | 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]] = {'avg_row_length': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'columns': FieldInfo(annotation=List[Column], required=True), 'constraints': FieldInfo(annotation=Constraints, required=True), 'created': FieldInfo(annotation=datetime, required=True, metadata=[PlainSerializer(func=<function <lambda>>, return_type=<class 'str'>, when_used='always')]), 'created_by': FieldInfo(annotation=str, required=True), 'creator': FieldInfo(annotation=User, required=True), 'data_length': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'database_id': FieldInfo(annotation=int, required=True), 'description': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'id': FieldInfo(annotation=int, required=True), 'identifiers': FieldInfo(annotation=Union[List[Identifier], NoneType], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'internal_name': FieldInfo(annotation=str, required=True), 'is_public': FieldInfo(annotation=bool, required=True), 'is_versioned': FieldInfo(annotation=bool, required=True), 'max_data_length': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'name': FieldInfo(annotation=str, required=True), 'num_rows': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'owner': FieldInfo(annotation=User, required=True), 'queue_name': FieldInfo(annotation=str, required=True), 'queue_type': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'routing_key': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: str¶
- num_rows: int | None¶
- queue_name: str¶
- queue_type: str | None¶
- routing_key: str¶
- class dbrepo.api.dto.TableBrief(*, id: int, database_id: int, name: str, description: str | None, internal_name: str, is_versioned: bool, owner: UserBrief)¶
Bases:
BaseModel
- database_id: int¶
- description: str | None¶
- id: int¶
- internal_name: str¶
- is_versioned: bool¶
- 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_id': FieldInfo(annotation=int, required=True), 'description': FieldInfo(annotation=Union[str, NoneType], required=True), 'id': FieldInfo(annotation=int, required=True), 'internal_name': FieldInfo(annotation=str, required=True), 'is_versioned': FieldInfo(annotation=bool, required=True), 'name': FieldInfo(annotation=str, required=True), 'owner': FieldInfo(annotation=UserBrief, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: str¶
- class dbrepo.api.dto.TableMinimal(*, id: int, database_id: int)¶
Bases:
BaseModel
- database_id: int¶
- id: int¶
- 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_id': FieldInfo(annotation=int, required=True), 'id': FieldInfo(annotation=int, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class dbrepo.api.dto.TableStatistics(*, columns: dict[str, ColumnStatistic])¶
Bases:
BaseModel
- columns: dict[str, ColumnStatistic]¶
- 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]] = {'columns': FieldInfo(annotation=dict[str, ColumnStatistic], required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class dbrepo.api.dto.TitleType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
str
,Enum
Enumeration of identifier title types.
- ALTERNATIVE_TITLE = 'AlternativeTitle'¶
- OTHER = 'Other'¶
- SUBTITLE = 'Subtitle'¶
- TRANSLATED_TITLE = 'TranslatedTitle'¶
- class dbrepo.api.dto.Unique(*, id: int, table: TableMinimal, columns: List[ColumnMinimal])¶
Bases:
BaseModel
- columns: List[ColumnMinimal]¶
- id: int¶
- 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]] = {'columns': FieldInfo(annotation=List[ColumnMinimal], required=True), 'id': FieldInfo(annotation=int, required=True), 'table': FieldInfo(annotation=TableMinimal, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- table: TableMinimal¶
- class dbrepo.api.dto.Unit(*, id: int, uri: str, created: ~datetime.Annotated[~datetime.datetime, ~pydantic.functional_serializers.PlainSerializer(func=~dbrepo.api.dto.<lambda>, return_type=str, when_used=always)], name: str | None = None, description: str | None = None)¶
Bases:
BaseModel
- created: Timestamp¶
- description: str | None¶
- id: int¶
- 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]] = {'created': FieldInfo(annotation=datetime, required=True, metadata=[PlainSerializer(func=<function <lambda>>, return_type=<class 'str'>, when_used='always')]), 'description': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'id': FieldInfo(annotation=int, required=True), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'uri': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: str | None¶
- uri: str¶
- class dbrepo.api.dto.UpdateAccess(*, type: AccessType)¶
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]] = {'type': FieldInfo(annotation=AccessType, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- type: AccessType¶
- class dbrepo.api.dto.UpdateColumn(*, concept_uri: str | None = None, unit_uri: str | None = None)¶
Bases:
BaseModel
- concept_uri: str | 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]] = {'concept_uri': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'unit_uri': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- unit_uri: str | None¶
- class dbrepo.api.dto.UpdateData(*, data: dict, keys: dict)¶
Bases:
BaseModel
- data: dict¶
- keys: dict¶
- 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]] = {'data': FieldInfo(annotation=dict, required=True), 'keys': FieldInfo(annotation=dict, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class dbrepo.api.dto.UpdateQuery(*, persist: bool)¶
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]] = {'persist': FieldInfo(annotation=bool, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- 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_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]] = {'affiliation': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'firstname': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'language': FieldInfo(annotation=str, required=True), 'lastname': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'orcid': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'theme': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- orcid: str | None¶
- theme: str¶
- class dbrepo.api.dto.UpdateUserPassword(*, password: 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]] = {'password': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- password: str¶
- class dbrepo.api.dto.UpdateUserTheme(*, theme: 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]] = {'theme': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- theme: 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_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]] = {'attributes': FieldInfo(annotation=UserAttributes, required=True), 'family_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'given_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'id': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'qualified_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'username': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: str | None¶
- qualified_name: str | None¶
- username: str¶
- class dbrepo.api.dto.UserAttributes(*, theme: str, orcid: str | None = None, affiliation: str | None = None)¶
Bases:
BaseModel
- affiliation: str | 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]] = {'affiliation': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'orcid': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'theme': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- 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_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]] = {'family_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'given_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'id': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'orcid': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'qualified_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'username': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: str | None¶
- orcid: str | None¶
- qualified_name: str | None¶
- username: str¶
- class dbrepo.api.dto.View(**data: Any)¶
Bases:
BaseModel
- columns: List[ViewColumn]¶
- created: Timestamp¶
- database_id: int¶
- id: int¶
- identifiers: List[Identifier]¶
- initial_view: bool¶
- internal_name: str¶
- is_public: bool¶
- last_modified: Timestamp¶
- 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]] = {'columns': FieldInfo(annotation=List[ViewColumn], required=True), 'created': FieldInfo(annotation=datetime, required=True, metadata=[PlainSerializer(func=<function <lambda>>, return_type=<class 'str'>, when_used='always')]), 'creator': FieldInfo(annotation=User, required=True), 'database_id': FieldInfo(annotation=int, required=True), 'id': FieldInfo(annotation=int, required=True), 'identifiers': FieldInfo(annotation=List[Identifier], required=False, default_factory=list, init=True, init_var=False, kw_only=<dataclasses._MISSING_TYPE object>), 'initial_view': FieldInfo(annotation=bool, required=True), 'internal_name': FieldInfo(annotation=str, required=True), 'is_public': FieldInfo(annotation=bool, required=True), 'last_modified': FieldInfo(annotation=datetime, required=True, metadata=[PlainSerializer(func=<function <lambda>>, return_type=<class 'str'>, when_used='always')]), 'name': FieldInfo(annotation=str, required=True), 'query': FieldInfo(annotation=str, required=True), 'query_hash': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: str¶
- query: str¶
- query_hash: str¶
- class dbrepo.api.dto.ViewBrief(**data: Any)¶
Bases:
BaseModel
- created: Timestamp¶
- database_id: int¶
- id: int¶
- identifier: List[Identifier]¶
- initial_view: bool¶
- internal_name: str¶
- is_public: bool¶
- last_modified: Timestamp¶
- 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]] = {'created': FieldInfo(annotation=datetime, required=True, metadata=[PlainSerializer(func=<function <lambda>>, return_type=<class 'str'>, when_used='always')]), 'creator': FieldInfo(annotation=User, required=True), 'database_id': FieldInfo(annotation=int, required=True), 'id': FieldInfo(annotation=int, required=True), 'identifier': FieldInfo(annotation=List[Identifier], required=True), 'initial_view': FieldInfo(annotation=bool, required=True), 'internal_name': FieldInfo(annotation=str, required=True), 'is_public': FieldInfo(annotation=bool, required=True), 'last_modified': FieldInfo(annotation=datetime, required=True, metadata=[PlainSerializer(func=<function <lambda>>, return_type=<class 'str'>, when_used='always')]), 'name': FieldInfo(annotation=str, required=True), 'query': FieldInfo(annotation=str, required=True), 'query_hash': FieldInfo(annotation=str, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: str¶
- query: str¶
- query_hash: str¶
- class dbrepo.api.dto.ViewColumn(*, id: int, name: str, database_id: int, internal_name: str, column_type: ColumnType, is_public: bool, 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: Concept | None = None, unit: Unit | None = None, index_length: int | None = None, length: int | None = None)¶
Bases:
BaseModel
- alias: str | None¶
- column_type: ColumnType¶
- d: int | None¶
- database_id: int¶
- id: int¶
- index_length: int | None¶
- internal_name: str¶
- is_null_allowed: bool¶
- is_public: bool¶
- length: int | None¶
- mean: float | None¶
- median: float | 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]] = {'alias': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'column_type': FieldInfo(annotation=ColumnType, required=True), 'concept': FieldInfo(annotation=Union[Concept, NoneType], required=False, default=None), 'd': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'database_id': FieldInfo(annotation=int, required=True), 'id': FieldInfo(annotation=int, required=True), 'index_length': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'internal_name': FieldInfo(annotation=str, required=True), 'is_null_allowed': FieldInfo(annotation=bool, required=True), 'is_public': FieldInfo(annotation=bool, required=True), 'length': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'mean': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'median': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'name': FieldInfo(annotation=str, required=True), 'size': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'unit': FieldInfo(annotation=Union[Unit, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: str¶
- size: int | None¶
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.