aioimmich API documentation
Description: Aioimmic library.

# Package `aioimmich`

Aioimmic library.

## Sub-modules

`aioimmich.albums`

  aioimmich albums api.

`aioimmich.api`

  aioimmich api.

`aioimmich.assets`

  aioimmich assets api.

`aioimmich.const`

  aioimmich constants.

`aioimmich.exceptions`

  aioimmich exceptions.

`aioimmich.people`

  aioimmich people api.

`aioimmich.search`

  aioimmich search api.

`aioimmich.server`

  aioimmich server api.

`aioimmich.tags`

  aioimmich tags api.

`aioimmich.users`

  aioimmich users api.

## Classes

`class Immich (aiohttp_session: ClientSession,
api_key: str,
host: str,
port: int = 2283,
use_ssl: bool = True,
device_id: str = 'python')`
  Expand source code

      class Immich:
          """Immich instance."""

          __slots__ = (
              "api",
              "albums",
              "assets",
              "people",
              "search",
              "server",
              "tags",
              "users",
          )

          api: ImmichApi
          albums: ImmichAlbums
          assets: ImmichAssests
          people: ImmichPeople
          search: ImmichSearch
          server: ImmichServer
          tags: ImmichTags
          users: ImmichUsers

          def __init__(
              self,
              aiohttp_session: ClientSession,
              api_key: str,
              host: str,
              port: int = 2283,
              use_ssl: bool = True,
              device_id: str = "python",
          ) -> None:
              """Immich instace init."""
              self.api = ImmichApi(aiohttp_session, api_key, device_id, host, port, use_ssl)

              self.albums = ImmichAlbums(self.api)
              self.assets = ImmichAssests(self.api)
              self.people = ImmichPeople(self.api)
              self.search = ImmichSearch(self.api)
              self.server = ImmichServer(self.api)
              self.tags = ImmichTags(self.api)
              self.users = ImmichUsers(self.api)

          async def async_setup(self) -> None:
              """Set up the API."""
              version = await self.api.async_do_request("server/version")
              assert isinstance(version, dict)
              self.api._version = ImmichServerVersion.from_dict(version)

  Immich instance.

  Immich instace init.

  ### Instance variables

  `var albums : ImmichAlbums`
    Expand source code

        class Immich:
            """Immich instance."""

            __slots__ = (
                "api",
                "albums",
                "assets",
                "people",
                "search",
                "server",
                "tags",
                "users",
            )

            api: ImmichApi
            albums: ImmichAlbums
            assets: ImmichAssests
            people: ImmichPeople
            search: ImmichSearch
            server: ImmichServer
            tags: ImmichTags
            users: ImmichUsers

            def __init__(
                self,
                aiohttp_session: ClientSession,
                api_key: str,
                host: str,
                port: int = 2283,
                use_ssl: bool = True,
                device_id: str = "python",
            ) -> None:
                """Immich instace init."""
                self.api = ImmichApi(aiohttp_session, api_key, device_id, host, port, use_ssl)

                self.albums = ImmichAlbums(self.api)
                self.assets = ImmichAssests(self.api)
                self.people = ImmichPeople(self.api)
                self.search = ImmichSearch(self.api)
                self.server = ImmichServer(self.api)
                self.tags = ImmichTags(self.api)
                self.users = ImmichUsers(self.api)

            async def async_setup(self) -> None:
                """Set up the API."""
                version = await self.api.async_do_request("server/version")
                assert isinstance(version, dict)
                self.api._version = ImmichServerVersion.from_dict(version)

  `var api : ImmichApi`
    Expand source code

        class Immich:
            """Immich instance."""

            __slots__ = (
                "api",
                "albums",
                "assets",
                "people",
                "search",
                "server",
                "tags",
                "users",
            )

            api: ImmichApi
            albums: ImmichAlbums
            assets: ImmichAssests
            people: ImmichPeople
            search: ImmichSearch
            server: ImmichServer
            tags: ImmichTags
            users: ImmichUsers

            def __init__(
                self,
                aiohttp_session: ClientSession,
                api_key: str,
                host: str,
                port: int = 2283,
                use_ssl: bool = True,
                device_id: str = "python",
            ) -> None:
                """Immich instace init."""
                self.api = ImmichApi(aiohttp_session, api_key, device_id, host, port, use_ssl)

                self.albums = ImmichAlbums(self.api)
                self.assets = ImmichAssests(self.api)
                self.people = ImmichPeople(self.api)
                self.search = ImmichSearch(self.api)
                self.server = ImmichServer(self.api)
                self.tags = ImmichTags(self.api)
                self.users = ImmichUsers(self.api)

            async def async_setup(self) -> None:
                """Set up the API."""
                version = await self.api.async_do_request("server/version")
                assert isinstance(version, dict)
                self.api._version = ImmichServerVersion.from_dict(version)

  `var assets : ImmichAssests`
    Expand source code

        class Immich:
            """Immich instance."""

            __slots__ = (
                "api",
                "albums",
                "assets",
                "people",
                "search",
                "server",
                "tags",
                "users",
            )

            api: ImmichApi
            albums: ImmichAlbums
            assets: ImmichAssests
            people: ImmichPeople
            search: ImmichSearch
            server: ImmichServer
            tags: ImmichTags
            users: ImmichUsers

            def __init__(
                self,
                aiohttp_session: ClientSession,
                api_key: str,
                host: str,
                port: int = 2283,
                use_ssl: bool = True,
                device_id: str = "python",
            ) -> None:
                """Immich instace init."""
                self.api = ImmichApi(aiohttp_session, api_key, device_id, host, port, use_ssl)

                self.albums = ImmichAlbums(self.api)
                self.assets = ImmichAssests(self.api)
                self.people = ImmichPeople(self.api)
                self.search = ImmichSearch(self.api)
                self.server = ImmichServer(self.api)
                self.tags = ImmichTags(self.api)
                self.users = ImmichUsers(self.api)

            async def async_setup(self) -> None:
                """Set up the API."""
                version = await self.api.async_do_request("server/version")
                assert isinstance(version, dict)
                self.api._version = ImmichServerVersion.from_dict(version)

  `var people : ImmichPeople`
    Expand source code

        class Immich:
            """Immich instance."""

            __slots__ = (
                "api",
                "albums",
                "assets",
                "people",
                "search",
                "server",
                "tags",
                "users",
            )

            api: ImmichApi
            albums: ImmichAlbums
            assets: ImmichAssests
            people: ImmichPeople
            search: ImmichSearch
            server: ImmichServer
            tags: ImmichTags
            users: ImmichUsers

            def __init__(
                self,
                aiohttp_session: ClientSession,
                api_key: str,
                host: str,
                port: int = 2283,
                use_ssl: bool = True,
                device_id: str = "python",
            ) -> None:
                """Immich instace init."""
                self.api = ImmichApi(aiohttp_session, api_key, device_id, host, port, use_ssl)

                self.albums = ImmichAlbums(self.api)
                self.assets = ImmichAssests(self.api)
                self.people = ImmichPeople(self.api)
                self.search = ImmichSearch(self.api)
                self.server = ImmichServer(self.api)
                self.tags = ImmichTags(self.api)
                self.users = ImmichUsers(self.api)

            async def async_setup(self) -> None:
                """Set up the API."""
                version = await self.api.async_do_request("server/version")
                assert isinstance(version, dict)
                self.api._version = ImmichServerVersion.from_dict(version)

  `var search : ImmichSearch`
    Expand source code

        class Immich:
            """Immich instance."""

            __slots__ = (
                "api",
                "albums",
                "assets",
                "people",
                "search",
                "server",
                "tags",
                "users",
            )

            api: ImmichApi
            albums: ImmichAlbums
            assets: ImmichAssests
            people: ImmichPeople
            search: ImmichSearch
            server: ImmichServer
            tags: ImmichTags
            users: ImmichUsers

            def __init__(
                self,
                aiohttp_session: ClientSession,
                api_key: str,
                host: str,
                port: int = 2283,
                use_ssl: bool = True,
                device_id: str = "python",
            ) -> None:
                """Immich instace init."""
                self.api = ImmichApi(aiohttp_session, api_key, device_id, host, port, use_ssl)

                self.albums = ImmichAlbums(self.api)
                self.assets = ImmichAssests(self.api)
                self.people = ImmichPeople(self.api)
                self.search = ImmichSearch(self.api)
                self.server = ImmichServer(self.api)
                self.tags = ImmichTags(self.api)
                self.users = ImmichUsers(self.api)

            async def async_setup(self) -> None:
                """Set up the API."""
                version = await self.api.async_do_request("server/version")
                assert isinstance(version, dict)
                self.api._version = ImmichServerVersion.from_dict(version)

  `var server : ImmichServer`
    Expand source code

        class Immich:
            """Immich instance."""

            __slots__ = (
                "api",
                "albums",
                "assets",
                "people",
                "search",
                "server",
                "tags",
                "users",
            )

            api: ImmichApi
            albums: ImmichAlbums
            assets: ImmichAssests
            people: ImmichPeople
            search: ImmichSearch
            server: ImmichServer
            tags: ImmichTags
            users: ImmichUsers

            def __init__(
                self,
                aiohttp_session: ClientSession,
                api_key: str,
                host: str,
                port: int = 2283,
                use_ssl: bool = True,
                device_id: str = "python",
            ) -> None:
                """Immich instace init."""
                self.api = ImmichApi(aiohttp_session, api_key, device_id, host, port, use_ssl)

                self.albums = ImmichAlbums(self.api)
                self.assets = ImmichAssests(self.api)
                self.people = ImmichPeople(self.api)
                self.search = ImmichSearch(self.api)
                self.server = ImmichServer(self.api)
                self.tags = ImmichTags(self.api)
                self.users = ImmichUsers(self.api)

            async def async_setup(self) -> None:
                """Set up the API."""
                version = await self.api.async_do_request("server/version")
                assert isinstance(version, dict)
                self.api._version = ImmichServerVersion.from_dict(version)

  `var tags : ImmichTags`
    Expand source code

        class Immich:
            """Immich instance."""

            __slots__ = (
                "api",
                "albums",
                "assets",
                "people",
                "search",
                "server",
                "tags",
                "users",
            )

            api: ImmichApi
            albums: ImmichAlbums
            assets: ImmichAssests
            people: ImmichPeople
            search: ImmichSearch
            server: ImmichServer
            tags: ImmichTags
            users: ImmichUsers

            def __init__(
                self,
                aiohttp_session: ClientSession,
                api_key: str,
                host: str,
                port: int = 2283,
                use_ssl: bool = True,
                device_id: str = "python",
            ) -> None:
                """Immich instace init."""
                self.api = ImmichApi(aiohttp_session, api_key, device_id, host, port, use_ssl)

                self.albums = ImmichAlbums(self.api)
                self.assets = ImmichAssests(self.api)
                self.people = ImmichPeople(self.api)
                self.search = ImmichSearch(self.api)
                self.server = ImmichServer(self.api)
                self.tags = ImmichTags(self.api)
                self.users = ImmichUsers(self.api)

            async def async_setup(self) -> None:
                """Set up the API."""
                version = await self.api.async_do_request("server/version")
                assert isinstance(version, dict)
                self.api._version = ImmichServerVersion.from_dict(version)

  `var users : ImmichUsers`
    Expand source code

        class Immich:
            """Immich instance."""

            __slots__ = (
                "api",
                "albums",
                "assets",
                "people",
                "search",
                "server",
                "tags",
                "users",
            )

            api: ImmichApi
            albums: ImmichAlbums
            assets: ImmichAssests
            people: ImmichPeople
            search: ImmichSearch
            server: ImmichServer
            tags: ImmichTags
            users: ImmichUsers

            def __init__(
                self,
                aiohttp_session: ClientSession,
                api_key: str,
                host: str,
                port: int = 2283,
                use_ssl: bool = True,
                device_id: str = "python",
            ) -> None:
                """Immich instace init."""
                self.api = ImmichApi(aiohttp_session, api_key, device_id, host, port, use_ssl)

                self.albums = ImmichAlbums(self.api)
                self.assets = ImmichAssests(self.api)
                self.people = ImmichPeople(self.api)
                self.search = ImmichSearch(self.api)
                self.server = ImmichServer(self.api)
                self.tags = ImmichTags(self.api)
                self.users = ImmichUsers(self.api)

            async def async_setup(self) -> None:
                """Set up the API."""
                version = await self.api.async_do_request("server/version")
                assert isinstance(version, dict)
                self.api._version = ImmichServerVersion.from_dict(version)

  ### Methods

  `async def async_setup(self) ‑> None`
    Expand source code

        async def async_setup(self) -> None:
            """Set up the API."""
            version = await self.api.async_do_request("server/version")
            assert isinstance(version, dict)
            self.api._version = ImmichServerVersion.from_dict(version)

    Set up the API.