IconPhoto

class pyinaturalist.models.IconPhoto(id, uuid, attribution, attribution_name, hidden, license_code, ...) None

Bases: Photo

Class used for displaying an iconic taxon in place of a taxon photo

Attributes

Methods

__init__(id, uuid, attribution, attribution_name, hidden, license_code, ...) None

Method generated by attrs for class IconPhoto.

classmethod copy(obj) BaseModel

Copy a model object. This is defined as a classmethod to easily initialize a subclass from a parent class instance. For copying an instance to the same type, copy.deepcopy() can be used.

Return type:

BaseModel

classmethod from_iconic_taxon(iconic_taxon_name)
classmethod from_json(value, **kwargs) Photo

Flatten out potentially nested photo field before initializing

Return type:

Photo

classmethod from_json_file(value) list[T]

Initialize a collection of model objects from a JSON string, file path, or file-like object

Return type:

list[TypeVar(T, bound= BaseModel)]

classmethod from_json_list(value, **kwargs) list[T]

Initialize a collection of model objects from an API response or response results

Return type:

list[TypeVar(T, bound= BaseModel)]

open(size) BinaryIO

Download the image and return as a file-like object

Return type:

BinaryIO

show(size)

Display the image inline in Jupyter notebooks, or with the system’s default image viewer.

Requires ipython in Jupyter environments, or pillow elsewhere.

to_dict(keys, recurse) dict[str, Any]

Convert this object back to dict format

Parameters:
  • keys (list[str] | None) – Only keep the specified keys (attribute names)

  • recurse (bool) – Recurse into nested model objects

Return type:

dict[str, Any]

url_size(size) str
Return type:

str