arbor_imago.models package
Subpackages
Submodules
arbor_imago.models.models module
- class arbor_imago.models.models.SignUp(*, issued: Annotated[datetime, 'The datetime at which the auth credential was issued'], expiry: Annotated[datetime, 'The datetime at which the auth credential will expire'], email: Annotated[EmailStr, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=254, pattern=None)])[source]
Bases:
AuthCredentialBase
- email: Annotated[EmailStr, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=254, pattern=None)]
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'registry': PydanticUndefined}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
arbor_imago.models.tables module
- class arbor_imago.models.tables.ApiKey(*, issued: Annotated[datetime, 'The datetime at which the auth credential was issued'], expiry: Annotated[datetime, 'The datetime at which the auth credential will expire'], user_id: str, id: str, name: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=256, pattern=None)])[source]
Bases:
_AuthCredentialTableBase
- api_key_scopes: Mapped[list[ApiKeyScope]]
- id: str
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'read_from_attributes': True, 'read_with_orm_mode': True, 'registry': PydanticUndefined, 'table': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=256, pattern=None)]
- user_id: custom_types.User.id
- class arbor_imago.models.tables.ApiKeyScope(*, api_key_id: str, scope_id: int)[source]
Bases:
SQLModel
- api_key_id: str
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'read_from_attributes': True, 'read_with_orm_mode': True, 'registry': PydanticUndefined, 'table': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- scope_id: int
- class arbor_imago.models.tables.File(*, id: str, stem: str, suffix: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=True, strict=None, min_length=None, max_length=None, pattern=None)], gallery_id: str, size: int)[source]
Bases:
SQLModel
- gallery_id: str
- id: str
- image_file_metadata: Mapped[ImageFileMetadata | None]
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'read_from_attributes': True, 'read_with_orm_mode': True, 'registry': PydanticUndefined, 'table': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- size: int
- stem: str
- suffix: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=True, strict=None, min_length=None, max_length=None, pattern=None)]
- class arbor_imago.models.tables.Gallery(*, id: str, name: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=256, pattern=re.compile('^(?!\\d{4}-\\d{2}-\\d{2} ).*'))], test: str, user_id: str, visibility_level: int, parent_id: str, description: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=0, max_length=20000, pattern=None)], date: date)[source]
Bases:
SQLModel
- description: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=0, max_length=20000, pattern=None)]
- gallery_permissions: Mapped[list[GalleryPermission]]
- id: str
- image_versions: Mapped[list[ImageVersion]]
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'read_from_attributes': True, 'read_with_orm_mode': True, 'registry': PydanticUndefined, 'table': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=256, pattern=re.compile('^(?!\\d{4}-\\d{2}-\\d{2} ).*'))]
- parent_id: str
- test: str
- user_id: str
- visibility_level: int
- class arbor_imago.models.tables.GalleryPermission(*, gallery_id: str, user_id: str, permission_level: int)[source]
Bases:
SQLModel
- gallery_id: str
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'read_from_attributes': True, 'read_with_orm_mode': True, 'registry': PydanticUndefined, 'table': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- permission_level: int
- user_id: str
- class arbor_imago.models.tables.ImageFileMetadata(*, file_id: str, version_id: str, scale: Annotated[int | None, Ge(ge=1), Le(le=99)])[source]
Bases:
SQLModel
- file_id: str
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'read_from_attributes': True, 'read_with_orm_mode': True, 'registry': PydanticUndefined, 'table': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- scale: int | None
- version: Mapped[ImageVersion]
- version_id: str
- class arbor_imago.models.tables.ImageVersion(*, id: str, base_name: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=240, pattern=re.compile('^(?!.*_).+$'))], parent_id: str, version: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=None, pattern=re.compile('^(?!\\d{2}$).+$'))], gallery_id: str, datetime: datetime, description: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=0, max_length=20000, pattern=None)], aspect_ratio: float, average_color: str)[source]
Bases:
SQLModel
- aspect_ratio: float
- average_color: str
- base_name: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=240, pattern=re.compile('^(?!.*_).+$'))]
- children: Mapped[list[ImageVersion]]
- description: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=0, max_length=20000, pattern=None)]
- gallery_id: str
- id: str
- image_file_metadatas: Mapped[list[ImageFileMetadata]]
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'read_from_attributes': True, 'read_with_orm_mode': True, 'registry': PydanticUndefined, 'table': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- parent: Mapped[ImageVersion | None]
- parent_id: str
- version: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=None, pattern=re.compile('^(?!\\d{2}$).+$'))]
- class arbor_imago.models.tables.OTP(*, issued: Annotated[datetime, 'The datetime at which the auth credential was issued'], expiry: Annotated[datetime, 'The datetime at which the auth credential will expire'], user_id: str, id: str, hashed_code: str)[source]
Bases:
_AuthCredentialTableBase
- hashed_code: str
- id: str
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'read_from_attributes': True, 'read_with_orm_mode': True, 'registry': PydanticUndefined, 'table': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- user_id: custom_types.User.id
- class arbor_imago.models.tables.User(*, id: str, email: Annotated[EmailStr, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=254, pattern=None)], phone_number: str | None = None, username: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=True, strict=None, min_length=3, max_length=20, pattern=re.compile('^[a-zA-Z0-9_.-]+$'))] | None = None, hashed_password: str | None = None, user_role_id: int)[source]
Bases:
SQLModel
- email: Annotated[EmailStr, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=254, pattern=None)]
- gallery_permissions: Mapped[list[GalleryPermission]]
- hashed_password: str | None
- id: str
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'read_from_attributes': True, 'read_with_orm_mode': True, 'registry': PydanticUndefined, 'table': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- phone_number: str | None
- user_access_tokens: Mapped[list[UserAccessToken]]
- user_role_id: int
- username: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=True, strict=None, min_length=3, max_length=20, pattern=re.compile('^[a-zA-Z0-9_.-]+$'))] | None
- class arbor_imago.models.tables.UserAccessToken(*, issued: Annotated[datetime, 'The datetime at which the auth credential was issued'], expiry: Annotated[datetime, 'The datetime at which the auth credential will expire'], user_id: str, id: str)[source]
Bases:
_AuthCredentialTableBase
- id: str
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'read_from_attributes': True, 'read_with_orm_mode': True, 'registry': PydanticUndefined, 'table': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- user_id: custom_types.User.id