# User

## *class* <mark style="color:purple;">User</mark>

Used to list and reference resources (e.g., datasets, workflows) owned by a particular user. If referencing resources owned by another user, you will only be able to see entities that you have access to.

## Constructors

<table data-header-hidden><thead><tr><th width="342">Method</th><th>Description</th></tr></thead><tbody><tr><td><a href="/pages/HIckckTXLxTiQzPmfWDH"><strong><code>redivis.current_user</code></strong></a>()</td><td>Construct a reference to the currently authenticated user.</td></tr><tr><td><a href="/pages/4vx3ED8fsfyXe9vRl8Cg"><strong><code>redivis.user</code></strong></a>(user_name)</td><td>Construct a reference to a user based on their (case-insensitive) username.</td></tr></tbody></table>

## Examples

{% tabs %}
{% tab title="Basics" %}

```python
user = redivis.user("imathews")

# List all datasets
datasets = user.list_datasets()

# Create a reference to a specific dataset
dataset = user.dataset("test_dataset")
```

{% endtab %}
{% endtabs %}

## Methods

<table data-header-hidden><thead><tr><th width="421">Name</th><th>Description</th></tr></thead><tbody><tr><td><a href="/pages/b2nlrr6n4SmM5pKC2wuj"><strong><code>user.dataset</code></strong></a>(dataset_name[, ...])</td><td>Construct a reference to a dataset owned by the user.</td></tr><tr><td><a href="/pages/Aw5yLtNCZIe1r7wisnUb"><strong><code>user.list_datasets</code></strong></a>([max_results])</td><td>List all visible datasets owned by the user.</td></tr><tr><td><a href="/pages/vSY2VUDtqTBGzt1FzN91"><strong><code>user.list_workflows</code></strong></a>([max_results])</td><td>List all visible workflows owned by the user.</td></tr><tr><td><a href="/pages/AtiJlauU9Lkil3BLqYIZ"><strong><code>user.secret</code></strong></a>(name)</td><td>Construct a reference to a secret defined by the user.</td></tr><tr><td><a href="/pages/TWihJd93cXIMG5gFpqxj"><strong><code>user.workflow</code></strong></a>(workflow_name)</td><td>Construct a reference to a workflow owned by the user.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.redivis.com/api/client-libraries/redivis-python/reference/user.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
