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

**`class NotesMixin`**

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

Notes API

Methods SummaryMethods Documentation

**`create_note(project_id, item_id, clip, color=None, comment=None, communities=None, facets=None)`**

Create a new Note.

Parameters

- `project_id` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – the ID of the project in which the note will be created.
- `item_id` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – the ID of the Squirro Item for which the note is created.
- `clip` ([`dict`](https://docs.python.org/3.11/library/stdtypes.html#dict)) – a dict which contains the information to locate the selected
  passage for the note. If it is a document-level note (i.e., a note for the
  whole item, not for a specific part of it), then only the field key with
  value item needs to be supplied.
- `color` ([`Optional`](https://docs.python.org/3.11/library/typing.html#typing.Optional)[[`str`](https://docs.python.org/3.11/library/stdtypes.html#str)]) – the color to use to highlight the note (selected text passage) on
  the UI.
- `comment` ([`Optional`](https://docs.python.org/3.11/library/typing.html#typing.Optional)[[`str`](https://docs.python.org/3.11/library/stdtypes.html#str)]) – an initial comment along with the creation of the note.
- `communities` ([`Optional`](https://docs.python.org/3.11/library/typing.html#typing.Optional)[[`list`](https://docs.python.org/3.11/library/stdtypes.html#list)[[`dict`](https://docs.python.org/3.11/library/stdtypes.html#dict)]]) – a list of communities assigned to the note.
- `facets` ([`Optional`](https://docs.python.org/3.11/library/typing.html#typing.Optional)[[`list`](https://docs.python.org/3.11/library/stdtypes.html#list)[[`dict`](https://docs.python.org/3.11/library/stdtypes.html#dict)]]) – a list of facets assigned to the note.

**`create_note_comment(project_id, note_id, text)`**

Create a new Comment for the Note.

Parameters

- `project_id` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – the ID of the project in which the note will be created.
- `note_id` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – the ID of the Note for which the comment is created.
- `text` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – a text of the comment.

**`delete_note(project_id, note_id)`**

Delete an existing Note.

Parameters

- `project_id` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – the ID of the project that the note belongs to.
- `note_id` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – the ID of the Note which will be deleted.

**`delete_note_comment(project_id, note_id, comment_id)`**

Delete the Comment of the Note.

Parameters

- `project_id` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – ID of the project that owns the note for which the comment will be deleted.
- `note_id` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – the ID of the Note  of the Comment.
- `comment_id` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – the ID of the Comment.

**`edit_note(project_id, note_id, color=None, communities=None, facets=None)`**

Edit the Note.

Parameters

- `project_id` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – the ID of the project that the note belongs to.
- `note_id` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – the ID of the Note which will be edited.
- `color` ([`Optional`](https://docs.python.org/3.11/library/typing.html#typing.Optional)[[`str`](https://docs.python.org/3.11/library/stdtypes.html#str)]) – the color to use to highlight the note (selected text passage) on
  the UI.
- `communities` ([`Optional`](https://docs.python.org/3.11/library/typing.html#typing.Optional)[[`list`](https://docs.python.org/3.11/library/stdtypes.html#list)[[`dict`](https://docs.python.org/3.11/library/stdtypes.html#dict)]]) – a list of communities assigned to the note.
- `facets` ([`Optional`](https://docs.python.org/3.11/library/typing.html#typing.Optional)[[`list`](https://docs.python.org/3.11/library/stdtypes.html#list)[[`dict`](https://docs.python.org/3.11/library/stdtypes.html#dict)]]) – a list of facets assigned to the note.

**`edit_note_comment(project_id, note_id, comment_id, text)`**

Edit the Comment of the Note.

Parameters

- `project_id` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – the ID of the project in which the note will be edited.
- `note_id` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – the ID of the Note of the Comment.
- `comment_id` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – the ID of the Comment.
- `text` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – a new text of the Comment.

**`query_notes(project_id, query=None, group_by_item=False, item_fields=None)`**

Parameters

- `project_id` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – the ID of the project from which notes will be queried.
- `query` ([`Optional`](https://docs.python.org/3.11/library/typing.html#typing.Optional)[[`str`](https://docs.python.org/3.11/library/stdtypes.html#str)]) – Squirro syntax query to run against notes. Only notes that match
  the given search criteria will be returned.
- `group_by_item` ([`bool`](https://docs.python.org/3.11/library/functions.html#bool)) – whether in the response the notes are grouped by the item
  they belong. Certain item fields can be requested when this is enabled.
- `item_fields` ([`Optional`](https://docs.python.org/3.11/library/typing.html#typing.Optional)[[`str`](https://docs.python.org/3.11/library/stdtypes.html#str)]) – comma-separated list of item fields to return. It is only
  applicable when the group_by_item parameter is True.
