Skip to content

Notes

NotesClient

Accessed via client.notes.

pyawe.client.NotesClient

NotesClient(http: _HttpSession)

Methods for the /notes resource.

list

list(entity_type: Optional[str] = None, entity_id: Optional[Union[UUID, str]] = None) -> List[Note]

Return top-level notes visible to the authenticated user.

Returns notes the caller owns plus all shared notes. Replies are excluded; use :meth:list_replies to fetch them.

Parameters:

Name Type Description Default
entity_type Optional[str]

Filter by entity type: "task", "workflow", or "job".

None
entity_id Optional[Union[UUID, str]]

Filter by the entity's UUID (requires entity_type).

None

Returns:

Type Description
List[Note]

List of :class:~pyawe.models.Note objects.

Raises:

Type Description
AweAuthError

If not authenticated.

create

create(entity_type: str, entity_id: Union[UUID, str], title: str, *, body: Optional[str] = None, is_shared: bool = False) -> Note

Create a top-level note on an entity.

Parameters:

Name Type Description Default
entity_type str

"task", "workflow", or "job".

required
entity_id Union[UUID, str]

UUID of the entity.

required
title str

Note title.

required
body Optional[str]

Optional Markdown body.

None
is_shared bool

When True, visible to all team members with access to the entity.

False

Returns:

Type Description
Note

The newly created :class:~pyawe.models.Note.

Raises:

Type Description
AweAuthError

If not authenticated.

get

get(note_id: Union[UUID, str]) -> Note

Fetch a single note.

Parameters:

Name Type Description Default
note_id Union[UUID, str]

UUID of the note.

required

Returns:

Type Description
Note

class:~pyawe.models.Note.

Raises:

Type Description
AweNotFoundError

If the note does not exist.

AweAuthError

If not authenticated.

update

update(note_id: Union[UUID, str], *, title: Optional[str] = None, body: Optional[str] = None, is_shared: Optional[bool] = None) -> Note

Update a note; only supplied fields are changed.

Parameters:

Name Type Description Default
note_id Union[UUID, str]

UUID of the note.

required
title Optional[str]

New title.

None
body Optional[str]

New Markdown body.

None
is_shared Optional[bool]

New visibility setting.

None

Returns:

Type Description
Note

The updated :class:~pyawe.models.Note.

Raises:

Type Description
AweNotFoundError

If the note does not exist.

AweAuthError

If not authenticated.

delete

delete(note_id: Union[UUID, str]) -> None

Delete a note.

Parameters:

Name Type Description Default
note_id Union[UUID, str]

UUID of the note to delete.

required

Raises:

Type Description
AweNotFoundError

If the note does not exist.

AweAuthError

If not authenticated.

list_replies

list_replies(note_id: Union[UUID, str]) -> List[Note]

Return all replies to a note.

Parameters:

Name Type Description Default
note_id Union[UUID, str]

UUID of the parent note.

required

Returns:

Type Description
List[Note]

List of reply :class:~pyawe.models.Note objects.

Raises:

Type Description
AweNotFoundError

If the note does not exist.

AweAuthError

If not authenticated.

create_reply

create_reply(note_id: Union[UUID, str], body: str) -> Note

Post a reply to a note.

Parameters:

Name Type Description Default
note_id Union[UUID, str]

UUID of the parent note.

required
body str

Reply text (Markdown supported).

required

Returns:

Type Description
Note

The created reply :class:~pyawe.models.Note.

Raises:

Type Description
AweNotFoundError

If the note does not exist.

AweAuthError

If not authenticated.

move

move(note_id: Union[UUID, str], folder_id: Optional[Union[UUID, str]]) -> Note

Move a note to a folder, or remove it from any folder.

Parameters:

Name Type Description Default
note_id Union[UUID, str]

UUID of the note.

required
folder_id Optional[Union[UUID, str]]

UUID of the destination folder, or None to unfile.

required

Returns:

Type Description
Note

The updated :class:~pyawe.models.Note.

Raises:

Type Description
AweNotFoundError

If the note does not exist.

AweAuthError

If not authenticated.


NoteFoldersClient

Accessed via client.note_folders.

pyawe.client.NoteFoldersClient

NoteFoldersClient(http: _HttpSession)

Methods for the /note-folders resource.

list

list() -> List[NoteFolder]

Return all note folders for the authenticated user.

Returns:

Type Description
List[NoteFolder]

List of :class:~pyawe.models.NoteFolder objects.

Raises:

Type Description
AweAuthError

If not authenticated.

create

create(name: str) -> NoteFolder

Create a note folder.

Parameters:

Name Type Description Default
name str

Folder name.

required

Returns:

Type Description
NoteFolder

The newly created :class:~pyawe.models.NoteFolder.

Raises:

Type Description
AweAuthError

If not authenticated.

update

update(folder_id: Union[UUID, str], name: str) -> NoteFolder

Rename a note folder.

Parameters:

Name Type Description Default
folder_id Union[UUID, str]

UUID of the folder.

required
name str

New name.

required

Returns:

Type Description
NoteFolder

The updated :class:~pyawe.models.NoteFolder.

Raises:

Type Description
AweNotFoundError

If the folder does not exist.

AweAuthError

If not authenticated.

delete

delete(folder_id: Union[UUID, str]) -> None

Delete a note folder.

Parameters:

Name Type Description Default
folder_id Union[UUID, str]

UUID of the folder to delete.

required

Raises:

Type Description
AweNotFoundError

If the folder does not exist.

AweAuthError

If not authenticated.