ConservationStatus#

class pyinaturalist.models.ConservationStatus(status_name=None, place_id=None, updater_id=None, user_id=None, **kwargs)#

Bases: BaseModel

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

Attributes

Name

Type

Description

id

int

Unique record ID

uuid

str

Unversally unique record ID

authority

str

Data source for conservation status

created_at

datetime

Date and time the record was created

description

str

Description of conservation status

geoprivacy

str

Default geoprivacy level; may be obscured or private for protected species

iucn

int

IUCN ID, if applicable

source_id

int

status

str

Short code for conservation status

taxon_id

int

Taxon ID

updated_at

datetime

Date and time the record was last updated

url

str

Link to data source with more details

status_name (property)

str

Full name of conservation status.

display_name (property)

str

Get conservation status name, code, and place in a format like:

place_id (property)

Optional[int]

updater_id (property)

Optional[int]

user_id (property)

Optional[int]

place_name (property)

Optional[str]

place (LazyProperty)

Place

Location that the conservation status applies to

updater (LazyProperty)

User

User that last updated the record

user (LazyProperty)

User

User that created the record

Methods

__init__(status_name=None, place_id=None, updater_id=None, user_id=None, **kwargs)#

Method generated by attrs for class BaseModel.

classmethod copy(obj)#

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_json(value, **kwargs)#

Initialize a single model object from an API response or response result.

Omits any invalid fields and None values, so default factories are used instead (e.g. for empty dicts and lists).

Return type:

TypeVar(T, bound= BaseModel)

classmethod from_json_file(value)#

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)#

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

Return type:

List[TypeVar(T, bound= BaseModel)]

to_dict(keys=None, recurse=True)#

Convert this object back to dict format

Parameters:
  • keys (Optional[List[str]]) – Only keep the specified keys (attribute names)

  • recurse (bool) – Recurse into nested model objects

Return type:

Dict[str, Any]