IdentificationController

class pyinaturalist.controllers.IdentificationController(client)

Bases: BaseController

Controller for Identification requests

Methods

__call__(identification_id, **params) Identification | None

Get a single identification by ID

Example

>>> client.identifications(16227955)
Parameters:

identification_id (int) – A single identification ID

Return type:

Optional[Identification]

__init__(client)
from_ids(identification_ids, **params) Paginator[Identification]

Get one or more identifications by ID

Notes

Examples

>>> ids = client.identifications.from_ids(700305837).all()
>>> ids = client.identifications.from_ids([700305837, 700306322]).all()
Parameters:

identification_ids (Union[int, Iterable[int]]) – One or more identification IDs

Return type:

Paginator[Identification]

search(current_taxon=None, own_observation=None, is_change=None, taxon_active=None, observation_taxon_active=None, id=None, rank=None, observation_rank=None, user_id=None, user_login=None, current=None, category=None, place_id=None, quality_grade=None, taxon_id=None, observation_taxon_id=None, iconic_taxon_id=None, observation_iconic_taxon_id=None, lrank=None, hrank=None, observation_lrank=None, observation_hrank=None, without_taxon_id=None, without_observation_taxon_id=None, d1=None, d2=None, observation_created_d1=None, observation_created_d2=None, observed_d1=None, observed_d2=None, id_above=None, id_below=None, page=None, per_page=None, order=None, order_by=None, count_only=None, reverse=None, only_id=None, **kwargs) Paginator[Identification]

Search identifications

Notes

Parameters:
  • current_taxon (Optional[bool]) – ID’s taxon is the same it’s observation’s taxon

  • own_observation (Optional[bool]) – ID was added by the observer

  • is_change (Optional[bool]) – ID was created as a results of a taxon change

  • taxon_active (Optional[bool]) – ID’s taxon is currently an active taxon

  • observation_taxon_active (Optional[bool]) – Observation’s taxon is currently an active taxon

  • id (Union[int, Iterable[int], None]) – Identification ID

  • rank (Union[str, Iterable[str], None]) – ID’s taxon must have this rank # Multiple choice

  • observation_rank (Union[str, Iterable[str], None]) – Observation’s taxon must have this rank # Multiple choice

  • user_id (Union[int, Iterable[int], str, Iterable[str], None]) – Identifier must have this user ID

  • user_login (Union[str, Iterable[str], None]) – Identifier must have this user login

  • current (Optional[bool]) – Most recent Identification on a observation by a user

  • category (Union[str, Iterable[str], None]) – Type of identification

  • place_id (Union[int, Iterable[int], None]) – Observation must occur in this place

  • quality_grade (Union[str, Iterable[str], None]) – Observation must have this quality grade

  • taxon_id (Union[int, Iterable[int], None]) – Identification taxa must match the given taxa or their descendants

  • observation_taxon_id (Union[int, Iterable[int], None]) – Observation taxa must match the given taxa or their descendants

  • iconic_taxon_id (Union[int, Iterable[int], None]) – Identification iconic taxon ID

  • observation_iconic_taxon_id (Union[int, Iterable[int], None]) – Observation iconic taxon ID

  • lrank (Optional[str]) – Identification taxon must have this rank or higher

  • hrank (Optional[str]) – Identification taxon must have this rank or lower

  • observation_lrank (Optional[str]) – Observation taxon must have this rank or higher

  • observation_hrank (Optional[str]) – Observation taxon must have this rank or lower

  • without_taxon_id (Union[int, Iterable[int], None]) – Exclude Identifications of these taxa and their descendants

  • without_observation_taxon_id (Union[int, Iterable[int], None]) – Exclude Identifications of observations of these taxa and their descendants

  • d1 (Union[date, datetime, str, None]) – Must be observed on or after this date

  • d2 (Union[date, datetime, str, None]) – Must be observed on or before this date

  • observation_created_d1 (Union[date, datetime, str, None]) – Observation must be created on or after this date

  • observation_created_d2 (Union[date, datetime, str, None]) – Observation must be created on or before this date

  • observed_d1 (Union[date, datetime, str, None]) – Observation must be observed on or after this date

  • observed_d2 (Union[date, datetime, str, None]) – Observation must be observed on or before this date

  • id_above (Optional[int]) – Must have an ID above this value

  • id_below (Optional[int]) – Must have an ID below this value

  • page (Optional[int]) – Page number of results to return

  • per_page (Optional[int]) – Number of results to return in a page. The maximum value is generally 200, unless otherwise noted

  • order (Optional[str]) – Sort order

  • order_by (Optional[str]) – Field to sort on

  • count_only (Optional[bool]) – Only return a count of results; alias for per_page=0

  • reverse (Optional[bool]) – Reverse the order of results; alias for order='descending'

  • only_id (Optional[bool]) – Return only the record IDs

Return type:

Paginator[Identification]

Example

Get all of your own species-level identifications:

>>> ids = client.identifications.search(user_login='my_username', rank='species').all()