# 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="redivis/redivis.current_user"><strong><code>redivis.current_user</code></strong></a>()</td><td>Construct a reference to the currently authenticated user.</td></tr><tr><td><a href="redivis/redivis.user"><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="user/user.dataset"><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="user/user.list_datasets"><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="user/user.secret"><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="user/user.list_workflows"><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="user/user.workflow"><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>
