Installation
uv:
Create a client
SetGUMNUT_API_KEY in the environment. The client reads it automatically, or
you can pass api_key explicitly.
Upload and organize a photo
Upload parameters use snake_case and include the source device identifiers and file timestamps required by the API.library_id is optional for accounts with one library and required when an
account has multiple libraries.
asset_data accepts bytes, a PathLike, or a (filename, contents, media type)
tuple. See the generated API reference
for the complete parameter types.
Search
Pagination
List methods return cursor pages that are directly iterable. Iterating the page automatically fetches subsequent pages as needed.has_next_page(), next_page_info(), and
get_next_page() on the returned page:
Async client
AsyncGumnut exposes the same resources and parameters. Use await for calls
and async for for auto-pagination.
Retries and timeouts
The SDK retries connection errors, timeouts, HTTP 408, 409, 429, and 5xx responses twice by default. Configure retries and the request timeout on the client:Error handling
Connection failures raiseAPIConnectionError. Non-success HTTP responses raise
an APIStatusError subclass with status_code and response properties.