Skip to content

iconify_types

Class info

Classes

Name Children Inherits
APIv2CollectionResponse
pycons.iconify.iconify_types
Object returned from collection(prefix).
    APIv2SearchParams
    pycons.iconify.iconify_types
    Request parameters for search(query).
      APIv2SearchResponse
      pycons.iconify.iconify_types
      Return value of search(query).
        APIv3KeywordsResponse
        pycons.iconify.iconify_types
        Return value of keywords().
          APIv3LastModifiedResponse
          pycons.iconify.iconify_types
          key is icon set prefix, value is lastModified property from that icon set.
            Author
            pycons.iconify.iconify_types
            Author information.
              IconifyAlias
              pycons.iconify.iconify_types
              Iconify alias object.
                IconifyIcon
                pycons.iconify.iconify_types
                Iconify icon object.
                  IconifyInfo
                  pycons.iconify.iconify_types
                  Icon set information block.
                    IconifyJSON
                    pycons.iconify.iconify_types
                    Return value of icon_data(prefix, *names).
                      IconifyMetadata
                      pycons.iconify.iconify_types
                      Icon set metadata, as published in the @iconify-json packages (metadata.json).
                        IconifyOptional
                        pycons.iconify.iconify_types
                        Optional properties that contain icon dimensions and transformations.
                          License
                          pycons.iconify.iconify_types
                          License information.

                            🛈 DocStrings

                            Type definitions for iconify response objects.

                            Credits to pyconify library. https://github.com/pyapp-kit/pyconify/blob/main/src/pyconify/iconify_types.py

                            APIv2CollectionResponse

                            Bases: TypedDict

                            Object returned from collection(prefix).

                            Source code in src/pycons/iconify/iconify_types.py
                            class APIv2CollectionResponse(TypedDict, total=False):
                                """Object returned from collection(prefix)."""
                            
                                prefix: Required[str]
                                """Icon set prefix."""
                                total: Required[int]
                                """Number of icons (duplicate of info?.total)."""
                                title: str
                                """Icon set title, if available (duplicate of info?.name)."""
                                info: IconifyInfo
                                """Icon set info."""
                                uncategorized: list[str]
                                """List of icons without categories."""
                                categories: dict[str, list[str]]
                                """List of icons, sorted by category."""
                                hidden: list[str]
                                """List of hidden icons."""
                                aliases: dict[str, str]
                                """List of aliases, key = alias, value = parent icon."""
                                chars: dict[str, str]
                                """Characters, key = character, value = icon name."""
                                prefixes: dict[str, str]
                                """Prefix mappings per https://iconify.design/docs/types/iconify-json-metadata.html#themes."""
                                suffixes: dict[str, str]
                                """Suffix mappings."""
                            

                            aliases instance-attribute

                            aliases: dict[str, str]
                            

                            List of aliases, key = alias, value = parent icon.

                            categories instance-attribute

                            categories: dict[str, list[str]]
                            

                            List of icons, sorted by category.

                            chars instance-attribute

                            chars: dict[str, str]
                            

                            Characters, key = character, value = icon name.

                            hidden instance-attribute

                            hidden: list[str]
                            

                            List of hidden icons.

                            info instance-attribute

                            Icon set info.

                            prefix instance-attribute

                            prefix: Required[str]
                            

                            Icon set prefix.

                            prefixes instance-attribute

                            prefixes: dict[str, str]
                            

                            Prefix mappings per https://iconify.design/docs/types/iconify-json-metadata.html#themes.

                            suffixes instance-attribute

                            suffixes: dict[str, str]
                            

                            Suffix mappings.

                            title instance-attribute

                            title: str
                            

                            Icon set title, if available (duplicate of info?.name).

                            total instance-attribute

                            total: Required[int]
                            

                            Number of icons (duplicate of info?.total).

                            uncategorized instance-attribute

                            uncategorized: list[str]
                            

                            List of icons without categories.

                            APIv2SearchParams

                            Bases: TypedDict

                            Request parameters for search(query).

                            Source code in src/pycons/iconify/iconify_types.py
                            class APIv2SearchParams(TypedDict, total=False):
                                """Request parameters for search(query)."""
                            
                                query: Required[str]
                                """Search string."""
                                limit: int
                                """Maximum number of items in response."""
                                start: int
                                """Start index for results."""
                                prefix: str
                                """Filter icon sets by one prefix."""
                                prefixes: str
                                """Filter icon sets by multiple prefixes or partial."""
                                category: str
                                """Filter icon sets by category."""
                                similar: bool
                                """Include partial matches for words (default = True)."""
                            

                            category instance-attribute

                            category: str
                            

                            Filter icon sets by category.

                            limit instance-attribute

                            limit: int
                            

                            Maximum number of items in response.

                            prefix instance-attribute

                            prefix: str
                            

                            Filter icon sets by one prefix.

                            prefixes instance-attribute

                            prefixes: str
                            

                            Filter icon sets by multiple prefixes or partial.

                            query instance-attribute

                            query: Required[str]
                            

                            Search string.

                            similar instance-attribute

                            similar: bool
                            

                            Include partial matches for words (default = True).

                            start instance-attribute

                            start: int
                            

                            Start index for results.

                            APIv2SearchResponse

                            Bases: TypedDict

                            Return value of search(query).

                            Source code in src/pycons/iconify/iconify_types.py
                            class APIv2SearchResponse(TypedDict, total=False):
                                """Return value of search(query)."""
                            
                                icons: list[str]
                                """List of prefix:name."""
                                total: int
                                """Number of results. If same as `limit`, more results are available."""
                                limit: int
                                """Number of results shown."""
                                start: int
                                """Index of first result."""
                                collections: dict[str, IconifyInfo]
                                """List of icon sets that match query."""
                                request: APIv2SearchParams
                                """Copy of request parameters."""
                            

                            collections instance-attribute

                            collections: dict[str, IconifyInfo]
                            

                            List of icon sets that match query.

                            icons instance-attribute

                            icons: list[str]
                            

                            List of prefix:name.

                            limit instance-attribute

                            limit: int
                            

                            Number of results shown.

                            request instance-attribute

                            Copy of request parameters.

                            start instance-attribute

                            start: int
                            

                            Index of first result.

                            total instance-attribute

                            total: int
                            

                            Number of results. If same as limit, more results are available.

                            APIv3KeywordsResponse

                            Bases: TypedDict

                            Return value of keywords().

                            Source code in src/pycons/iconify/iconify_types.py
                            class APIv3KeywordsResponse(TypedDict, total=False):
                                """Return value of keywords()."""
                            
                                keyword: str
                                """Keyword (one of keyword or prefix will be present)."""
                                prefix: str
                                """Prefix (one of keyword or prefix will be present)."""
                                exists: Required[bool]
                                """Whether the keyword exists."""
                                matches: Required[list[str]]
                                """Matching results."""
                                invalid: Literal[True]
                                """Indicates if the query was invalid."""
                            

                            exists instance-attribute

                            exists: Required[bool]
                            

                            Whether the keyword exists.

                            invalid instance-attribute

                            invalid: Literal[True]
                            

                            Indicates if the query was invalid.

                            keyword instance-attribute

                            keyword: str
                            

                            Keyword (one of keyword or prefix will be present).

                            matches instance-attribute

                            matches: Required[list[str]]
                            

                            Matching results.

                            prefix instance-attribute

                            prefix: str
                            

                            Prefix (one of keyword or prefix will be present).

                            APIv3LastModifiedResponse

                            Bases: TypedDict

                            key is icon set prefix, value is lastModified property from that icon set.

                            Source code in src/pycons/iconify/iconify_types.py
                            class APIv3LastModifiedResponse(TypedDict):
                                """key is icon set prefix, value is lastModified property from that icon set."""
                            
                                lastModified: dict[str, int]
                                """Dictionary mapping icon set prefixes to their lastModified timestamps."""
                            

                            lastModified instance-attribute

                            lastModified: dict[str, int]
                            

                            Dictionary mapping icon set prefixes to their lastModified timestamps.

                            Author

                            Bases: TypedDict

                            Author information.

                            Source code in src/pycons/iconify/iconify_types.py
                            class Author(TypedDict, total=False):
                                """Author information."""
                            
                                name: Required[str]
                                """Author name."""
                                url: NotRequired[str]
                                """Author website."""
                            

                            name instance-attribute

                            name: Required[str]
                            

                            Author name.

                            url instance-attribute

                            url: NotRequired[str]
                            

                            Author website.

                            IconifyAlias

                            Bases: IconifyOptional

                            Iconify alias object.

                            Source code in src/pycons/iconify/iconify_types.py
                            class IconifyAlias(IconifyOptional, total=False):
                                """Iconify alias object."""
                            
                                parent: Required[str]
                                """Name of the parent icon."""
                                hidden: bool
                                """Alias was removed from the set but is kept for backwards compatibility."""
                            

                            hidden instance-attribute

                            hidden: bool
                            

                            Alias was removed from the set but is kept for backwards compatibility.

                            parent instance-attribute

                            parent: Required[str]
                            

                            Name of the parent icon.

                            IconifyIcon

                            Bases: IconifyOptional

                            Iconify icon object.

                            Source code in src/pycons/iconify/iconify_types.py
                            class IconifyIcon(IconifyOptional, total=False):
                                """Iconify icon object."""
                            
                                body: Required[str]
                                """Icon's SVG data."""
                                hidden: bool
                                """Icon was removed from the set but is kept for backwards compatibility."""
                            

                            body instance-attribute

                            body: Required[str]
                            

                            Icon's SVG data.

                            hidden instance-attribute

                            hidden: bool
                            

                            Icon was removed from the set but is kept for backwards compatibility.

                            IconifyInfo

                            Bases: TypedDict

                            Icon set information block.

                            Source code in src/pycons/iconify/iconify_types.py
                            class IconifyInfo(TypedDict, total=False):
                                """Icon set information block."""
                            
                                name: Required[str]
                                """Icon set name."""
                                author: Required[Author]
                                """Author info."""
                                license: Required[License]
                                """License info."""
                                total: int
                                """Total number of icons."""
                                version: str
                                """Version string."""
                                height: int | list[int]
                                """Icon grid: number or array of numbers."""
                                displayHeight: int
                                """Display height for samples: 16 - 24."""
                                category: str
                                """Category on Iconify collections list."""
                                tags: list[str]
                                """List of tags to group similar icon sets."""
                                palette: bool
                                """Palette status. True -> predefined color scheme, False -> use currentColor."""
                                hidden: bool
                                """If true, icon set should not appear in icon sets list."""
                            

                            author instance-attribute

                            author: Required[Author]
                            

                            Author info.

                            category instance-attribute

                            category: str
                            

                            Category on Iconify collections list.

                            displayHeight instance-attribute

                            displayHeight: int
                            

                            Display height for samples: 16 - 24.

                            height instance-attribute

                            height: int | list[int]
                            

                            Icon grid: number or array of numbers.

                            hidden instance-attribute

                            hidden: bool
                            

                            If true, icon set should not appear in icon sets list.

                            license instance-attribute

                            license: Required[License]
                            

                            License info.

                            name instance-attribute

                            name: Required[str]
                            

                            Icon set name.

                            palette instance-attribute

                            palette: bool
                            

                            Palette status. True -> predefined color scheme, False -> use currentColor.

                            tags instance-attribute

                            tags: list[str]
                            

                            List of tags to group similar icon sets.

                            total instance-attribute

                            total: int
                            

                            Total number of icons.

                            version instance-attribute

                            version: str
                            

                            Version string.

                            IconifyJSON

                            Bases: IconifyOptional

                            Return value of icon_data(prefix, *names).

                            Source code in src/pycons/iconify/iconify_types.py
                            class IconifyJSON(IconifyOptional, total=False):
                                """Return value of icon_data(prefix, *names)."""
                            
                                prefix: Required[str]
                                """Icon set prefix."""
                                icons: Required[dict[str, IconifyIcon]]
                                """Dictionary of icon names to icon data."""
                                lastModified: int
                                """Timestamp of last modification."""
                                aliases: dict[str, IconifyAlias]
                                """Dictionary mapping aliases to their alias data."""
                                not_found: list[str]
                                """List of icon names that were not found."""
                            

                            aliases instance-attribute

                            aliases: dict[str, IconifyAlias]
                            

                            Dictionary mapping aliases to their alias data.

                            icons instance-attribute

                            icons: Required[dict[str, IconifyIcon]]
                            

                            Dictionary of icon names to icon data.

                            lastModified instance-attribute

                            lastModified: int
                            

                            Timestamp of last modification.

                            not_found instance-attribute

                            not_found: list[str]
                            

                            List of icon names that were not found.

                            prefix instance-attribute

                            prefix: Required[str]
                            

                            Icon set prefix.

                            IconifyMetadata

                            Bases: TypedDict

                            Icon set metadata, as published in the @iconify-json packages (metadata.json).

                            Source code in src/pycons/iconify/iconify_types.py
                            class IconifyMetadata(TypedDict, total=False):
                                """Icon set metadata, as published in the @iconify-json packages (metadata.json)."""
                            
                                categories: dict[str, list[str]]
                                """Icon names sorted by category."""
                                prefixes: dict[str, str]
                                """Theme prefixes."""
                                suffixes: dict[str, str]
                                """Theme suffixes."""
                            

                            categories instance-attribute

                            categories: dict[str, list[str]]
                            

                            Icon names sorted by category.

                            prefixes instance-attribute

                            prefixes: dict[str, str]
                            

                            Theme prefixes.

                            suffixes instance-attribute

                            suffixes: dict[str, str]
                            

                            Theme suffixes.

                            IconifyOptional

                            Bases: TypedDict

                            Optional properties that contain icon dimensions and transformations.

                            Source code in src/pycons/iconify/iconify_types.py
                            class IconifyOptional(TypedDict, total=False):
                                """Optional properties that contain icon dimensions and transformations."""
                            
                                left: int
                                """Left position of the ViewBox, default = 0."""
                                top: int
                                """Top position of the ViewBox, default = 0."""
                                width: int
                                """Width of the ViewBox, default = 16."""
                                height: int
                                """Height of the ViewBox, default = 16."""
                                rotate: int
                                """Number of 90-degree rotations (1=90deg, etc...), default = 0."""
                                hFlip: bool
                                """Horizontal flip, default = false."""
                                vFlip: bool
                                """Vertical flip, default = false."""
                            

                            hFlip instance-attribute

                            hFlip: bool
                            

                            Horizontal flip, default = false.

                            height instance-attribute

                            height: int
                            

                            Height of the ViewBox, default = 16.

                            left instance-attribute

                            left: int
                            

                            Left position of the ViewBox, default = 0.

                            rotate instance-attribute

                            rotate: int
                            

                            Number of 90-degree rotations (1=90deg, etc...), default = 0.

                            top instance-attribute

                            top: int
                            

                            Top position of the ViewBox, default = 0.

                            vFlip instance-attribute

                            vFlip: bool
                            

                            Vertical flip, default = false.

                            width instance-attribute

                            width: int
                            

                            Width of the ViewBox, default = 16.

                            License

                            Bases: TypedDict

                            License information.

                            Source code in src/pycons/iconify/iconify_types.py
                            class License(TypedDict, total=False):
                                """License information."""
                            
                                title: Required[str]
                                """License title."""
                                spdx: str
                                """SPDX license ID."""
                                url: str
                                """License URL."""
                            

                            spdx instance-attribute

                            spdx: str
                            

                            SPDX license ID.

                            title instance-attribute

                            title: Required[str]
                            

                            License title.

                            url instance-attribute

                            url: str
                            

                            License URL.