# Member

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

Members on Redivis represent individuals who interface with an organization, including both data administrators and researchers applying to and using that organization's data. You must be an administrator of the respective organization in order to view and edit members.

## Constructors

<table data-header-hidden><thead><tr><th width="439">Method</th><th>Description</th></tr></thead><tbody><tr><td><a href="organization/organization.member"><strong><code>Organization.member</code></strong></a>(name)</td><td>Construct a new member instance based on the member's username.</td></tr><tr><td><a href="organization/organization.list_datasets"><strong><code>Organization.list_members</code></strong></a>([max_results, ....])</td><td>Returns a list of members within the organization.</td></tr></tbody></table>

## Examples

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

<pre class="language-python"><code class="lang-python"><strong>my_org = redivis.organization("some_organization")
</strong><strong>
</strong><strong># List all members
</strong><strong>members = my_org.list_members()
</strong><strong>for member in members:
</strong><strong>   # ... do something with the member
</strong><strong>
</strong><strong># Get a specific member
</strong><strong>a_member = my_org.member("jane_doe")
</strong># Will throw an error if the member doesn't exists
# Can first call member.exists() to check for existence
a_member.get()

print(a_member.properties)
</code></pre>

{% endtab %}

{% tab title="Filter members" %}

```python
my_org = redivis.organization("some_organization")

# List all pending members with a given label
pending_humanities_members = my_org.list_members(
    status=["pending"], 
    labels=["school:humanities"]
)
for member in members:
   # ... do something with the member
```

{% endtab %}

{% tab title="Update members" %}

<pre class="language-python"><code class="lang-python">my_org = redivis.organization("some_organization")
members = my_org.list_members(...)
<strong>
</strong>for member in members:
   # E.g., call an internal API to validate that member
   status = validate_member_against_internal_systems(member)
   member.update(status=status)
</code></pre>

{% endtab %}
{% endtabs %}

## Attributes

| **`organization`** | A reference to the [Organization](https://docs.redivis.com/api/client-libraries/redivis-python/reference/organization) instance that constructed this member.                                                                                                                                                                                                                     |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`properties`**   | <p>A dict containing the <a href="../../../resource-definitions/member">API resource representation of the member</a>. This will be fully populated after calling <a href="dataset/dataset.get">get()</a>.<br><br>This will also be partially populated for datasets returned via the <a href="organization/organization.list_members">Organization.list\_members</a> method.</p> |
| **`user`**         | A reference to the [User](https://docs.redivis.com/api/client-libraries/redivis-python/reference/user) instance associated with this member.                                                                                                                                                                                                                                      |

## Methods

<table data-header-hidden><thead><tr><th width="450"></th><th></th></tr></thead><tbody><tr><td><a href="member/member.add_comment"><strong><code>Member.add_comment</code></strong></a>(labels)</td><td>Add a comment to a member's application.</td></tr><tr><td><a href="member/member.add_labels"><strong><code>Member.add_labels</code></strong></a>(labels)</td><td>Add labels to a member.</td></tr><tr><td><a href="member/member.exists"><strong><code>Member.exists</code></strong></a>()</td><td>Check whether the member exists.</td></tr><tr><td><a href="member/member.get"><strong><code>Member.get</code></strong></a>()</td><td>Get the member, populating the <code>properties</code> attribute on the current instance.</td></tr><tr><td><a href="member/member.remove_labels"><strong><code>Member.remove_labels</code></strong></a>(labels)</td><td>Remove labels from a member.</td></tr><tr><td><a href="member/member.update"><strong><code>Member.update</code></strong></a>([*, status, labels, ...])</td><td>Update certain attributes on the member.</td></tr></tbody></table>
