User¶
- class pyinaturalist.models.User(id=None, uuid=None, activity_count=0, annotated_observations_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
Unique record ID
uuid
Unversally unique record ID
activity_count
Combined user activity including observations, identifications, and journal posts
annotated_observations_count
Number of observations the user has annotated
created_at
Date and time the user was registered
icon
URL for small user icon
icon_url
URL for medium user icon
identifications_count
Number of identifications the user has made
journal_posts_count
Number of journal posts the user has made
login
User login/username
name
User real name or display name
observations_count
Number of observations the user has made
orcid
ORCID iD
roles
User roles on inaturalist.org
site_id
Site ID for iNaturalist network members, or
1
for inaturalist.orgspecies_count
Number of unique species the user has observed
username (
property
)Alias of
login
display_name (
property
)Alias of
name
url (
property
)User info URL on iNaturalist.org
Methods
- __init__(id=None, uuid=None, activity_count=0, annotated_observations_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:
- 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
- classmethod from_json_list(value, **kwargs)¶
Initialize a collection of model objects from an API response or response results