Client

Functions

pyinaturalist.client.client

pyinaturalist.client.oauth

build_authorize_url

Build the OAuth2 authorization URL.

get_access_token

Get an access token using the user's iNaturalist username and password, using the Resource Owner Password Credentials Flow.

get_access_token_via_auth_code

Get an access token using the OAuth2 Authorization Code flow, optionally with PKCE.

get_keyring_credentials

Attempt to get iNaturalist credentials from the system keyring

set_keyring_credentials

Store iNaturalist credentials in the system keyring for future use.

validate_token

Determine if an access token is valid

pyinaturalist.client.oauth_callback

build_authorize_url

Build the OAuth2 authorization URL.

get_auth_code_via_server

Start a local HTTP server, open the browser for authorization, and wait for the callback.

pyinaturalist.client.paginator

paginate_all

Get all pages of a multi-page request.

pyinaturalist.client.session

clear_cache

Clear all cached API responses

delete

Wrapper around requests.delete() with additional options specific to iNat API requests

format_request

Format HTTP request info

format_response

Format HTTP response info, including whether it came from the cache

get

Wrapper around requests.get() with additional options specific to iNat API requests

get_local_session

Get a thread-local Session object with default settings.

is_dry_run_enabled

A wrapper to determine if dry-run (aka test mode) has been enabled via either a constant or an environment variable.

post

Wrapper around requests.post() with additional options specific to iNat API requests

put

Wrapper around requests.put() with additional options specific to iNat API requests

Submodules