ConservationStatus

class pyinaturalist.models.ConservationStatus(id=None, authority=None, created_at=None, description=None, geoprivacy=None, iucn=None, source_id=None, status=None, status_name=None, taxon_id=None, updated_at=None, url=None, place=None, updater=None, user=None)

Bases: pyinaturalist.models.taxon_meta.IdWrapperMixin, pyinaturalist.models.base.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

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

IUCD ID, if applicable

source_id

int

status

str

Short code for conservation status

Options: LC, NT, VU, EN, CR, EW, EX, S2B

status_name

str

Full name of 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

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__(id=None, authority=None, created_at=None, description=None, geoprivacy=None, iucn=None, source_id=None, status=None, status_name=None, taxon_id=None, updated_at=None, url=None, place=None, updater=None, user=None)

Method generated by attrs for class ConservationStatus.

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)

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

Return type

List[TypeVar(T, bound= BaseModel)]

to_json()

Convert this object back to JSON (dict) format

Return type

Dict[str, Any]