> ## Documentation Index
> Fetch the complete documentation index at: https://docs.haiqu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# User management

### User details

#### Haiqu.user(raise\_on\_error=False)

Get the logged in user.

* **Parameters:**
  **raise\_on\_error** (*bool*) -- By default, human-friendly messages are returned. Set this to raise exceptions instead.
* **Returns:**
  The logged in user, or an error message or None if in Jupyter Lab.
* **Return type:**
  UserModel | str | None

#### Examples

```python theme={null}
>>> haiqu.user()
UserModel(email='example@haiqu.ai', ...)
```

### Set user handle

#### Haiqu.set\_handle(handle)

Choose your handle, which names you in the Haiqu cloud.

Other users will see your handle, and you may not change it once it is set!

A handle has 4 to 32 characters: lowercase letters, digits and hyphens. It starts with a letter, and each hyphen sits
between two letters or digits (no repeated, leading, or trailing hyphens), as in `example-user-2`.

* **Parameters:**
  **handle** (*str*) -- Your new handle.
* **Returns:**
  Your profile, with the handle.
* **Return type:**
  UserModel

- **Raises:**
  **ValueError** -- If `handle` is not a valid handle, if it is reserved or already taken, or if you already have a
  different handle. The message gives the reason.

#### Examples

```python theme={null}
>>> haiqu.set_handle("example-user-2").handle
'example-user-2'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.