> ## 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.owners

#### *property* Tables.owners *: [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 edit the data in tables and the schema of 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.owners
{'ROLE_ADMIN'}
>>> 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 none of the [`owners`](#atoti.tables.Tables.owners) roles and is thus not allowed to edit the data in tables:

```pycon theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
>>> connected_session.tables[table.name].drop()  
Traceback (most recent call last):
    ...
RuntimeError: This action is not available. ...
```

And not allowed to edit the schema of tables:

```pycon theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
>>> del connected_session.tables[table.name]  
Traceback (most recent call last):
    ...
atoti._graphql.client.exceptions.GraphQLClientHttpError: HTTP status code: 400
```

Granting ownership to all users:

```pycon theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
>>> session.tables.owners.add("ROLE_USER")
>>> sorted(session.tables.owners)
['ROLE_ADMIN', 'ROLE_USER']
```

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