seguro.commands.notifier.model

Classes

AttachmentBase(*[, inline, expires])

FileAttachment(*[, inline, expires])

Notification(*, body[, title, notify_type, ...])

RawAttachment(*[, inline, expires])

StoreAttachment(*[, inline, expires])

class seguro.commands.notifier.model.AttachmentBase(*, inline=False, expires=datetime.timedelta(days=7))[source]

Bases: BaseModel, ABC

Parameters:
  • inline (bool)

  • expires (timedelta)

expires: timedelta
inline: bool
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class seguro.commands.notifier.model.FileAttachment(*, inline=False, expires=datetime.timedelta(days=7), file)[source]

Bases: AttachmentBase

Parameters:
  • inline (bool)

  • expires (timedelta)

  • file (Annotated[Path, PathType(path_type=file)])

file: Annotated[Path, PathType(path_type=file)]
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class seguro.commands.notifier.model.Notification(*, body, title='', notify_type='info', body_format='text', attachments=[], tag='all')[source]

Bases: BaseModel

Parameters:
attachments: list[StoreAttachment | RawAttachment | FileAttachment]
body: str
body_format: str
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

notify_type: str
tag: str | list[str | list[str]]
title: str
class seguro.commands.notifier.model.RawAttachment(*, inline=False, expires=datetime.timedelta(days=7), name, contents)[source]

Bases: AttachmentBase

Parameters:
  • inline (bool)

  • expires (timedelta)

  • name (str)

  • contents (bytes)

contents: bytes
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
class seguro.commands.notifier.model.StoreAttachment(*, inline=False, expires=datetime.timedelta(days=7), object_name)[source]

Bases: AttachmentBase

Parameters:
  • inline (bool)

  • expires (timedelta)

  • object_name (str)

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

object_name: str