ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

class documentation

class Message: (source)

Constructor: Message(options)

View In Hierarchy

Configure one direct send without exposing a mutable MIME message.

The instance belongs to a single operation: a callback receives it once, and the options it holds are snapshotted before preparation starts.

Method __init__ Initialize an operation-local mutable configurator.
Method _appendRecipients Append normalized recipients to one internal address field.
Method _snapshot Return the immutable current declaration for preparation.
Method attach Append a deferred storage attachment.
Method bcc Append hidden transport recipients.
Method cc Append carbon-copy recipients.
Method fromAddress Replace the From header and the transport sender.
Method replyTo Append Reply-To mailboxes without adding transport recipients.
Method subject Replace the literal subject, including with an empty string.
Method to Append primary visible recipients.
Class Variable __slots__ Undocumented
Instance Variable _options Undocumented
def __init__(self, options: MailOptions | None = None): (source)

Initialize an operation-local mutable configurator.

Parameters
options:MailOptions | NoneInitial immutable snapshot supplied by PendingMail.
Returns
NoneRetain an immutable snapshot, replaced by each mutator.
def _appendRecipients(self, field: str, value: Recipients, name: str | None) -> Self: (source)

Append normalized recipients to one internal address field.

Parameters
field:strInternal recipient collection name.
value:RecipientsSupplied recipient declaration.
name:str | NoneOptional single-mailbox display name.
Returns
SelfThis configurator with its snapshot replaced.
def _snapshot(self) -> MailOptions: (source)

Return the immutable current declaration for preparation.

Returns
MailOptionsA snapshot unaffected by later mutations of this Message.
def attach(self, attachment: Attachment) -> Self: (source)

Append a deferred storage attachment.

Parameters
attachment:AttachmentSafe immutable attachment declaration.
Returns
SelfThis configurator.
Raises
MailCompositionExceptionIf the supplied object is not an Attachment.
def bcc(self, addresses: Recipients, name: str | None = None) -> Self: (source)

Append hidden transport recipients.

Parameters
addresses:RecipientsOne mailbox or a list/tuple of mailboxes.
name:str | NoneDisplay name for one string mailbox only.
Returns
SelfThis configurator.
def cc(self, addresses: Recipients, name: str | None = None) -> Self: (source)

Append carbon-copy recipients.

Parameters
addresses:RecipientsOne mailbox or a list/tuple of mailboxes.
name:str | NoneDisplay name for one string mailbox only.
Returns
SelfThis configurator.
def fromAddress(self, address: str | Address, name: str | None = None) -> Self: (source)

Replace the From header and the transport sender.

Parameters
address:str | AddressExactly one sender mailbox.
name:str | NoneDisplay name for a string mailbox only.
Returns
SelfThis configurator.
def replyTo(self, addresses: Recipients, name: str | None = None) -> Self: (source)

Append Reply-To mailboxes without adding transport recipients.

Parameters
addresses:RecipientsOne mailbox or a list/tuple of mailboxes.
name:str | NoneDisplay name for one string mailbox only.
Returns
SelfThis configurator.
def subject(self, value: str) -> Self: (source)

Replace the literal subject, including with an empty string.

Parameters
value:strSubject without control characters.
Returns
SelfThis configurator.
def to(self, addresses: Recipients, name: str | None = None) -> Self: (source)

Append primary visible recipients.

Parameters
addresses:RecipientsOne mailbox or a list/tuple of mailboxes.
name:str | NoneDisplay name for one string mailbox only.
Returns
SelfThis configurator.
__slots__: tuple[str, ...] = (source)

Undocumented

_options = (source)

Undocumented