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 MailManager(PendingMail, IMailManager): (source)

Constructor: MailManager(app, composer)

View In Hierarchy

Resolve central mail configuration and delegate the shared fluent pipeline.

The inherited empty chain is never mutated: every fluent entry creates a new PendingMail. No operation envelope, body, or attachment is cached on the manager, and factories run per send so they may resolve shared stateless transports through the container. A Mailable class is also built through the application container for each send.

Concurrency

Driver registration is synchronous and rejects duplicates, so drivers must be registered during provider startup, before concurrent sends. Transport resolution and preparation keep all per-operation state in local variables.

Method __init__ Retain shared dependencies without validating or opening transports.
Method _applyGlobalSender Overlay the configured global sender on an envelope that declares none.
Async Method _buildMailable Build one reusable mail declaration with the application container.
Async Method _deliver Prepare a message completely before resolving and invoking its transport.
Method _resolveMailer Normalize only the selected central mailer without environment reads.
Method extend Register a new driver without silently replacing existing registrations.
Class Variable __slots__ Undocumented
Instance Variable _app Undocumented
Instance Variable _composer Undocumented
Instance Variable _factories Undocumented
def __init__(self, app: IApplication, composer: MailComposer): (source)

Retain shared dependencies without validating or opening transports.

Parameters
app:IApplicationCentral configuration and dependency container.
composer:MailComposerSingle pipeline for views, storage, validation, and MIME.
Returns
NoneInitialize built-in factories and an empty immutable fluent chain.
def _applyGlobalSender(self, envelope: Envelope) -> Envelope: (source)

Overlay the configured global sender on an envelope that declares none.

Parameters
envelope:EnvelopeOperation-local envelope without a From header.
Returns
EnvelopeThe received envelope when no global sender is configured, or an equivalent copy carrying the configured mailbox.
Raises
MailConfigurationExceptionIf the configured sender is neither a mapping nor an entity.
MailCompositionExceptionIf the configured mailbox or display name is invalid.
async def _buildMailable(self, mailable: type[Mailable]) -> Mailable: (source)

Build one reusable mail declaration with the application container.

Parameters
mailable:type[Mailable]Reusable mail class requested by a send operation.
Returns
MailableA fresh declaration with constructor dependencies injected.
async def _deliver(self, name: str | None, envelope: Envelope, content: Content, attachments: tuple[Attachment, ...]) -> MailResult: (source)

Prepare a message completely before resolving and invoking its transport.

Parameters
name:str | NoneExplicit mailer name, or None for the central default.
envelope:EnvelopeFinal operation-local envelope.
content:ContentNormalized content declaration.
attachments:tuple[Attachment, ...]Merged deferred attachments.
Returns
MailResultResult reported by the selected transport.
Raises
MailConfigurationExceptionIf the mailer, driver, or factory result is invalid.
MailExceptionIf composition, rendering, attachment resolution, or transport fails.
def _resolveMailer(self, name: str | None) -> tuple[str, str, Mapping[str, object]]: (source)

Normalize only the selected central mailer without environment reads.

Parameters
name:str | NoneExplicit mailer, or None for the central default.
Returns
tuple[str, str, Mapping[str, object]]Mailer name, driver name, and copied read-only configuration.
Raises
MailConfigurationExceptionIf the section, name, or selected entry is invalid or missing.
def extend(self, driver: str, factory: TransportFactory): (source)

Register a new driver without silently replacing existing registrations.

Parameters
driver:strUnique implementation name used in a mailer's driver option.
factory:TransportFactoryCallable receiving the application and the normalized configuration and returning an IMailTransport or an awaitable of one.
Returns
NoneStore the factory without running it or validating mailer entries.
Raises
MailConfigurationExceptionIf registration is invalid or duplicates a built-in or custom driver.
__slots__: tuple[str, ...] = (source)

Undocumented

Undocumented

_composer = (source)

Undocumented

_factories: dict[str, TransportFactory] = (source)

Undocumented