pyinaturalist.models Package#

Data models that represent iNaturalist API response objects. See Models section for usage details.

Functions#

add_lazy_attrs(cls, fields)

A field transformer to do some post-processing on a model class while it's being created.

coordinate_pair([doc])

Field containing a pair of coordinates

datetime_field(**kwargs)

Field that converts date/time strings into datetime objects

datetime_now_field(**kwargs)

Field that converts date/time strings into datetime objects, and defaults to the current time

field([doc, options, metadata])

A field with extra metadata for documentation and options

get_lazy_properties(cls)

rtype:

Dict[str, LazyProperty]

is_in(options)

Validator for an optional multiple-choice attribute

load_json(value)

Load a JSON string, file path, or file-like object

make_tree(taxa[, include_ranks, sort_key])

Organize a list of taxa into a taxonomic tree.

upper(value)

Converter to change a string to uppercase, if applicable

Classes#

Annotation(**kwargs)

An annotation, meaning a controlled term value applied by a user to an observation.

Application([id, uuid, icon, name, url])

An iNaturalist mobile or third-party application

BaseModel([id, uuid])

Base class for data models

BaseModelCollection([id, uuid])

Base class for data model collections.

Checklist([id, uuid, title])

A taxon checklist (aka "original life list")

Comment([id, body, created_at, hidden, ...])

An observation comment, based on the schema of comments from GET /observations.

ConservationStatus([status_name, place_id, ...])

The conservation status of a taxon in a given location, based on the schema of:

ControlledTerm([id, is_value, multivalued, ...])

A controlled term, based on the schema of GET /controlled_terms.

ControlledTermCount([id, uuid, count, ...])

A count + histogram of a controlled term and value

ControlledTermCounts([id, uuid, data])

Used with GET /observations/popular_field_values.

ControlledTermValue([id, blocking, label, ...])

A controlled term value, based on the schema of GET /controlled_terms.

EstablishmentMeans([id, uuid, ...])

The establishment means for a taxon in a given location

Fave([id, uuid, created_at, vote_flag, ...])

An observation favorited by a user

Flag([id, uuid, comment, created_at, flag, ...])

A flag on an observation

ID

alias of Identification

IconPhoto([id, attribution, license_code, ...])

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

Identification([id, body, created_at, ...])

An observation identification, based on the schema of GET /identifications.

LazyProperty(converter[, name, doc, type])

A lazy-initialized/cached descriptor for attrs classes.

LifeList([id, uuid, data, ...])

A user's life list, based on the schema of GET /observations/taxonomy

ListedTaxon([list_id, place_id, updater_id, ...])

A taxon with additional stats associated with a list (aka "original life list"), based on the schema of:

Message([id, uuid, user_id, thread_id, ...])

A message from the user's inbox, based on the schema of GET /messages

OFD

alias of ObservationField

OFV

alias of ObservationFieldValue

Observation(**kwargs)

An observation, based the schema of GET /observations

ObservationField([id, allowed_values, ...])

An observation field definition, based on the schema of GET /observation_fields.

ObservationFieldValue([id, datatype, ...])

An observation field value, based on the schema of Observation.ofvs from GET /observations.

Observations([id, uuid, data])

A collection of observations

Photo([id, attribution, license_code, ...])

An observation photo, based on the schema of photos from:

Place([id, uuid, admin_level, ...])

A curated or community-contributed place.

Project([id, uuid, banner_color, ...])

An iNaturalist project, based on the schema of GET /projects.

ProjectObservation([id, preferences, ...])

Metadata about an observation that has been added to a project

ProjectObservationField([id, ...])

An ObservationField with additional project-specific information

ProjectUser([id, uuid, activity_count, ...])

A User with additional project-specific information

QualityMetric([id, uuid, agree, metric, user])

An observation quality metric added by a user to an observation

SearchResult([id, uuid, score, type, ...])

A search result of any type, based on the schema of GET /search.

Sound([id, uuid, attribution, license_code, ...])

An observation sound, based on the schema of sounds from:

Taxon([id, uuid, ancestry, ancestor_ids, ...])

An iNaturalist taxon, based on the schema of GET /taxa.

TaxonCount([id, uuid, ancestry, ...])

A Taxon with an associated count, used in a TaxonCounts collection

TaxonCounts([id, uuid, data])

A collection of taxa with an associated counts.

TaxonSummary([id, uuid, wikipedia_summary, ...])

Information about an observation's taxon, within the context of the observation's location.

User([id, uuid, activity_count, created_at, ...])

An iNaturalist user, based on the schema of GET /users/{id}

UserCount([id, uuid, activity_count, ...])

An iNaturalist user, with an associated count of filtered IDs or observations

UserCounts([id, uuid, data])

A collection of users with an associated counts

Vote([id, uuid, created_at, vote_flag, ...])

A vote on a data quality assessment metric

pyinaturalist.controllers Package#

Controller classes for iNatClient. These contain all the request functions used by the client, grouped by resource type.

Classes#

AnnotationController(*args, **kwargs)

Controller for Annotation and ControlledTerm requests

BaseController(client)

Base class for controllers.

ObservationController(client)

Controller for Observation requests

PlaceController(client)

Controller for Place requests

ProjectController(client)

Controller for Project requests

SearchController(client)

Unified text search

TaxonController(client)

Controller for Taxon requests

UserController(client)

Controller for User requests