aioimmich.assets.models API documentation
Description: aioimmich models.

# Module `aioimmich.assets.models`

aioimmich models.

## Classes

`class AssetType (*args, **kwds)`
  Expand source code

      class AssetType(StrEnum):
          """Asset type."""

          AUDIO = "AUDIO"
          IMAGE = "IMAGE"
          OTHER = "OTHER"
          VIDEO = "VIDEO"

  Asset type.

  ### Ancestors

  - enum.StrEnum
  - builtins.str
  - enum.ReprEnum
  - enum.Enum

  ### Class variables

  `var AUDIO`
  `var IMAGE`
  `var OTHER`
  `var VIDEO`
`class ExifInfo (city: str | None = None,
country: str | None = None,
date_time_original: datetime | None = None,
description: str | None = None,
exif_image_height: int | None = None,
exif_image_width: int | None = None,
exposure_time: str | None = None,
file_size_in_byte: int | None = None,
f_number: float | None = None,
focal_length: float | None = None,
iso: int | None = None,
latitude: float | None = None,
lens_model: str | None = None,
longitude: float | None = None,
make: str | None = None,
model: str | None = None,
modify_date: str | None = None,
orientation: str | None = None,
projection_type: str | None = None,
rating: str | None = None,
state: str | None = None,
time_zone: str | None = None)`
  Expand source code

      @dataclass
      class ExifInfo(DataClassJSONMixin):
          """Exif info."""

          city: str | None = field(default=None)
          country: str | None = field(default=None)
          date_time_original: datetime | None = field(
              metadata=field_options(alias="dateTimeOriginal"), default=None
          )
          description: str | None = field(default=None)
          exif_image_height: int | None = field(
              metadata=field_options(alias="exifImageHeight"), default=None
          )
          exif_image_width: int | None = field(
              metadata=field_options(alias="exifImageWidth"), default=None
          )
          exposure_time: str | None = field(
              metadata=field_options(alias="exposureTime"), default=None
          )
          file_size_in_byte: int | None = field(
              metadata=field_options(alias="fileSizeInByte"), default=None
          )
          f_number: float | None = field(
              metadata=field_options(alias="fNumber"), default=None
          )
          focal_length: float | None = field(
              metadata=field_options(alias="focalLength"), default=None
          )
          iso: int | None = field(default=None)
          latitude: float | None = field(default=None)
          lens_model: str | None = field(
              metadata=field_options(alias="lensModel"), default=None
          )
          longitude: float | None = field(default=None)
          make: str | None = field(default=None)
          model: str | None = field(default=None)
          modify_date: str | None = field(
              metadata=field_options(alias="modifyDate"), default=None
          )
          orientation: str | None = field(default=None)
          projection_type: str | None = field(
              metadata=field_options(alias="projectionType"), default=None
          )
          rating: str | None = field(default=None)
          state: str | None = field(default=None)
          time_zone: str | None = field(
              metadata=field_options(alias="timeZone"), default=None
          )

  Exif info.

  ### Ancestors

  - mashumaro.mixins.json.DataClassJSONMixin
  - mashumaro.mixins.dict.DataClassDictMixin

  ### Static methods

  `def from_dict(d, *, dialect=None)`

  ### Instance variables

  `var city : str | None`
  `var country : str | None`
  `var date_time_original : datetime.datetime | None`
  `var description : str | None`
  `var exif_image_height : int | None`
  `var exif_image_width : int | None`
  `var exposure_time : str | None`
  `var f_number : float | None`
  `var file_size_in_byte : int | None`
  `var focal_length : float | None`
  `var iso : int | None`
  `var latitude : float | None`
  `var lens_model : str | None`
  `var longitude : float | None`
  `var make : str | None`
  `var model : str | None`
  `var modify_date : str | None`
  `var orientation : str | None`
  `var projection_type : str | None`
  `var rating : str | None`
  `var state : str | None`
  `var time_zone : str | None`

  ### Methods

  `def to_dict(self)`
`class ImmichAsset (asset_id: str,
asset_type: AssetType,
checksum: str,
duration: str,
file_created_at: datetime,
file_modified_at: datetime,
has_metadata: bool,
is_archived: bool,
is_favorite: bool,
is_offline: bool,
is_trashed: bool,
local_datetime: datetime,
original_file_name: str,
original_path: str,
owner_id: str,
people: list,
resized: bool,
thumbhash: str,
updated_at: datetime,
device_asset_id: str | None = None,
device_id: str | None = None,
duplicate_id: str | None = None,
exif_info: ExifInfo | None = None,
library_id: str | None = None,
live_photo_video_id: str | None = None,
original_mime_type: str | None = None,
visibility: str | None = None)`
  Expand source code

      @dataclass
      class ImmichAsset(DataClassJSONMixin):
          """Representation of an immich asset."""

          # non-default parameters
          asset_id: str = field(metadata=field_options(alias="id"))
          asset_type: AssetType = field(metadata=field_options(alias="type"))
          checksum: str
          duration: str
          file_created_at: datetime = field(metadata=field_options(alias="fileCreatedAt"))
          file_modified_at: datetime = field(metadata=field_options(alias="fileModifiedAt"))
          has_metadata: bool = field(metadata=field_options(alias="hasMetadata"))
          is_archived: bool = field(metadata=field_options(alias="isArchived"))
          is_favorite: bool = field(metadata=field_options(alias="isFavorite"))
          is_offline: bool = field(metadata=field_options(alias="isOffline"))
          is_trashed: bool = field(metadata=field_options(alias="isTrashed"))
          local_datetime: datetime = field(metadata=field_options(alias="localDateTime"))
          original_file_name: str = field(metadata=field_options(alias="originalFileName"))
          original_path: str = field(metadata=field_options(alias="originalPath"))
          owner_id: str = field(metadata=field_options(alias="ownerId"))
          people: list  # TODO: proper dataclass necessary
          resized: bool
          thumbhash: str
          updated_at: datetime = field(metadata=field_options(alias="updatedAt"))

          # default parameters
          device_asset_id: str | None = field(
              metadata=field_options(alias="deviceAssetId"), default=None
          )
          device_id: str | None = field(
              metadata=field_options(alias="deviceId"), default=None
          )
          duplicate_id: str | None = field(
              metadata=field_options(alias="duplicateId"), default=None
          )
          exif_info: ExifInfo | None = field(
              metadata=field_options(alias="exifInfo"), default=None
          )
          library_id: str | None = field(
              metadata=field_options(alias="libraryId"), default=None
          )  # This property was deprecated in v1.106.0
          live_photo_video_id: str | None = field(
              metadata=field_options(alias="livePhotoVideoId"), default=None
          )
          original_mime_type: str | None = field(
              metadata=field_options(alias="originalMimeType"), default=None
          )
          visibility: str | None = field(default=None)

  Representation of an immich asset.

  ### Ancestors

  - mashumaro.mixins.json.DataClassJSONMixin
  - mashumaro.mixins.dict.DataClassDictMixin

  ### Static methods

  `def from_dict(d, *, dialect=None)`

  ### Instance variables

  `var asset_id : str`
  `var asset_type : AssetType`
  `var checksum : str`
  `var device_asset_id : str | None`
  `var device_id : str | None`
  `var duplicate_id : str | None`
  `var duration : str`
  `var exif_info : ExifInfo | None`
  `var file_created_at : datetime.datetime`
  `var file_modified_at : datetime.datetime`
  `var has_metadata : bool`
  `var is_archived : bool`
  `var is_favorite : bool`
  `var is_offline : bool`
  `var is_trashed : bool`
  `var library_id : str | None`
  `var live_photo_video_id : str | None`
  `var local_datetime : datetime.datetime`
  `var original_file_name : str`
  `var original_mime_type : str | None`
  `var original_path : str`
  `var owner_id : str`
  `var people : list`
  `var resized : bool`
  `var thumbhash : str`
  `var updated_at : datetime.datetime`
  `var visibility : str | None`

  ### Methods

  `def to_dict(self)`
`class ImmichAssetUploadResponse (asset_id: str,
status: UploadStatus)`
  Expand source code

      @dataclass
      class ImmichAssetUploadResponse(DataClassJSONMixin):
          """Representation of an immich asset upload response."""

          asset_id: str = field(metadata=field_options(alias="id"))
          status: UploadStatus

  Representation of an immich asset upload response.

  ### Ancestors

  - mashumaro.mixins.json.DataClassJSONMixin
  - mashumaro.mixins.dict.DataClassDictMixin

  ### Static methods

  `def from_dict(d, *, dialect=None)`

  ### Instance variables

  `var asset_id : str`
  `var status : UploadStatus`

  ### Methods

  `def to_dict(self)`
`class UploadStatus (*args, **kwds)`
  Expand source code

      class UploadStatus(StrEnum):
          """Asset upload status."""

          CREATED = "created"
          DUPLICATED = "duplicate"
          REPLACED = "replaced"

  Asset upload status.

  ### Ancestors

  - enum.StrEnum
  - builtins.str
  - enum.ReprEnum
  - enum.Enum

  ### Class variables

  `var CREATED`
  `var DUPLICATED`
  `var REPLACED`