<!-- Source: https://docs.squirro.com/en/latest/api/squirro_client.topic.ThemesMixin.html -->
# ThemesMixin

**`class ThemesMixin`**

Bases: [`object`](https://docs.python.org/3.11/library/functions.html#object)

Methods SummaryMethods Documentation

**`delete_dashboard_theme(project_id, theme_id)`**

Delete a specific dashboard theme from the given project.

Parameters

- `project_id` – Project identifier
- `theme_id` – Theme identifier

Returns

No return value.

Example:

```
>>> client.delete_dashboard_theme('2aEVClLRRA-vCCIvnuEAvQ',
...                               'Ue1OceLkQlyz21wpPqml9Q')
```

**`get_dashboard_theme(project_id, theme_id)`**

Return a specific dashboard theme from the given project.

Parameters

- `project_id` – Project identifier
- `theme_id` – Dashboard identifier

Returns

A dictionary of the given dashboard theme.

Example:

```
>>> client.get_dashboard_theme('2aEVClLRRA-vCCIvnuEAvQ',
...                            'G0Tm2SQcTqu2d4GvfyrsMg')
{u'id': u'G0Tm2SQcTqu2d4GvfyrsMg',
 u'title': u'Test',
 u'scope': u'custom',
 u'definition': [{u'background': u'#ffffff',
                 u'titleColor': u'#525252',
                 .....}]}]
```

**`get_dashboard_themes(project_id)`**

Return all dashboard themes for the given project.

Parameters

`project_id` – Project identifier

Returns

A list of dashboard theme dictionaries.

Example:

```
>>> client.get_dashboard_themes('2aEVClLRRA-vCCIvnuEAvQ')
[{u'id': u'G0Tm2SQcTqu2d4GvfyrsMg',
  u'title': u'Test',
  u'scope': u'custom',
  u'definition': [{u'background': u'#ffffff',
                   u'titleColor': u'#525252',
                   .....}]}]
```

**`modify_dashboard_theme(project_id, theme_id, title=None, definition=None)`**

Update a dashboard theme.

Parameters

- `project_id` – Project identifier
- `dashboard_id` – Dashboard identifier
- `title` – Dashboard title
- `definition` – Theme definition
- `widgets` – Widgets shown on the dashboard

Returns

A dictionary of the updated dashboard.

Example:

```
>>> client.modify_dashboard_theme('2aEVClLRRA-vCCIvnuEAvQ',
...     'YagQNSecR_ONHxwBmOkkeQ', title='New Title')
{
    u'id': u'YagQNSecR_ONHxwBmOkkeQ',
    u'title': u'New Title',
    u'definition': [{u'background': u'#ffffff',
                     u'titleColor': u'#525252',
                     .....}]}]
}
```

**`new_dashboard_theme(project_id, title, definition=None)`**

Create a new dashboard theme.

Parameters

- `project_id` – Project identifier
- `title` – Theme title
- `definition` – Theme definition

Returns

Location of new theme.

Example:

```
>>> client.new_dashboard_theme('2aEVClLRRA-vCCIvnuEAvQ',
...                            title='Sample')
{u'id': u'G0Tm2SQcTqu2d4GvfyrsMg',
 u'title': u'Test',
 u'scope': u'custom',
 u'definition': [{u'background': u'#ffffff',
                 u'titleColor': u'#525252',
                 .....}]}]
```
