UserController

class pyinaturalist.controllers.UserController(client)

Bases: pyinaturalist.controllers.base.BaseController

Controller for User requests

Methods

__init__(client)
autocomplete(**params)

Given a query string, return users with names or logins starting with the search term

Notes

Parameters
  • q (Optional[str]) – Search query

  • project_id – Only show users who are members of this project unless otherwise noted

  • order_by (Optional[str]) – Field to sort on

  • reverse (Optional[bool]) – Reverse the order of results; alias for order='descending'

Return type

List[User]

from_id(*user_ids, **params)

Get users by ID

Example

Get a user by ID:

>>> user = client.users.from_id(1).one()

Get multiple users by ID:

>>> users = client.users.from_id(1).all()
Parameters

user_ids (Union[int, str]) – One or more project IDs

Return type

Paginator[User]