User#

class pyinaturalist.models.User(id=None, uuid=None, activity_count=0, created_at=_Nothing.NOTHING, icon=None, icon_url=None, identifications_count=0, journal_posts_count=0, login=None, name=None, observations_count=0, orcid=None, roles=_Nothing.NOTHING, site_id=None, species_count=0)#

Bases: BaseModel

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

Attributes

Name

Type

Description

id

int

Unique record ID

uuid

str

Unversally unique record ID

activity_count

int

Combined user activity including observations, identifications, and journal posts

created_at

datetime

Date and time the user was registered

icon

str

URL for small user icon

icon_url

str

URL for medium user icon

identifications_count

int

Number of identifications the user has made

journal_posts_count

int

Number of journal posts the user has made

login

str

User login/username

name

str

User real name or display name

observations_count

int

Number of observations the user has made

orcid

str

ORCID iD

roles

List[str]

User roles on inaturalist.org

site_id

int

Site ID for iNaturalist network members, or 1 for inaturalist.org

species_count

int

Number of unique species the user has observed

username (property)

str

Alias of login

display_name (property)

str

Alias of name

url (property)

str

User info URL on iNaturalist.org

Methods

__init__(id=None, uuid=None, activity_count=0, created_at=_Nothing.NOTHING, icon=None, icon_url=None, identifications_count=0, journal_posts_count=0, login=None, name=None, observations_count=0, orcid=None, roles=_Nothing.NOTHING, site_id=None, species_count=0)#

Method generated by attrs for class User.

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]