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

# atoti.tables.Tables.readers

#### *property* Tables.readers *: [MutableSet](https://docs.python.org/3/library/collections.abc.html#collections.abc.MutableSet)\[[str](https://docs.python.org/3/library/stdtypes.html#str)]*

The roles allowing to read data from tables.

### Example

```pycon theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
>>> session_config = tt.SessionConfig(security=tt.SecurityConfig())
>>> session = tt.Session.start(session_config)
>>> table = session.create_table(
...     "Table", data_types={"ID": "String", "Value": "int"}, keys={"ID"}
... )
>>> table += ("foo", 42)
>>> session.tables.readers
{'ROLE_USER'}
>>> authentication = tt.BasicAuthentication("username", "passwd")
>>> session.security.individual_roles[authentication.username] = {
...     "ROLE_USER"
... }
>>> session.security.basic_authentication.credentials[
...     authentication.username
... ] = authentication.password
>>> connected_session = tt.Session.connect(
...     session.url, authentication=authentication
... )
```

The user has one of the [`readers`](#atoti.tables.Tables.readers) roles and can thus read data from the table:

```pycon theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
>>> connected_session.tables[table.name].query()
    ID  Value
0  foo     42
```

Changing the [`readers`](#atoti.tables.Tables.readers) roles to revoke access:

```pycon theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
>>> session.tables.readers.clear()
>>> try:
...     connected_session.tables[table.name].query()
... except Exception as error:
...     error.response.status_code
400
```

<Callout icon="link">
  **See also**:
  [`owners`](./atoti.tables.Tables.owners#atoti.tables.Tables.owners) and [`restrictions`](./atoti.tables.Tables.restrictions#atoti.tables.Tables.restrictions).
</Callout>
