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.

module documentation

Store effective SMTP settings without exposing credentials in repr.

Function _has_controls Detect whitespace and non-printable characters in an endpoint.
Function _port Validate the effective SMTP TCP port.
Function _text Read a string setting without including its value in errors.
Function _timeout Validate a blocking SMTP timeout without silently replacing None.
Function _url_overrides Parse the supported MAIL_URL components with explicit precedence.
Constant _DEFAULT_PORT Default port value used by smtp_settings.
Constant _ENCRYPTIONS Accepted encryption names, including the empty string that a configuration uses to request an explicit plaintext connection.
Constant _MAX_PORT Max port value used by smtp_settings.
Constant _SMTPS_PORT Smtps port value used by smtp_settings.
def _has_controls(value: str) -> bool: (source)

Detect whitespace and non-printable characters in an endpoint.

Parameters
value:strURL or hostname.
Returns
boolWhether the endpoint contains forbidden characters.
def _port(value: object) -> int: (source)

Validate the effective SMTP TCP port.

Parameters
value:objectPort after applying URL precedence.
Returns
intPort inside the TCP range.
Raises
orionis.mail.exceptions.MailConfigurationExceptionIf the port is not an integer between 1 and 65535.
def _text(config: Mapping[str, object], key: str, default: str) -> str: (source)

Read a string setting without including its value in errors.

Parameters
config:collections.abc.Mapping[str, object]Effective connection options.
key:strOption name.
default:strValue used when the option is absent.
Returns
strUnmodified setting.
Raises
orionis.mail.exceptions.MailConfigurationExceptionIf a setting is not a string.
def _timeout(value: object) -> int | None: (source)

Validate a blocking SMTP timeout without silently replacing None.

Parameters
value:objectConfigured integer seconds, or None.
Returns
int | NoneExplicit timeout; None means an unbounded socket wait.
Raises
orionis.mail.exceptions.MailConfigurationExceptionIf the timeout is not a positive integer or None.
def _url_overrides(url: str) -> dict[str, object]: (source)

Parse the supported MAIL_URL components with explicit precedence.

Parameters
url:strEmpty string, smtp URL, or smtps URL without extra components.
Returns
dict[str, object]Only the options supplied or forced by the URL.
Raises
orionis.mail.exceptions.MailConfigurationExceptionIf the URL is malformed or includes unsupported components.
_DEFAULT_PORT: int = (source)

Default port value used by smtp_settings.

Value
587
_ENCRYPTIONS: dict[str, MailEncryption] = (source)

Accepted encryption names, including the empty string that a configuration uses to request an explicit plaintext connection.

Value
{'tls': MailEncryption.TLS,
 'ssl': MailEncryption.SSL,
 'none': MailEncryption.NONE,
 '': MailEncryption.NONE}
_MAX_PORT: int = (source)

Max port value used by smtp_settings.

Value
65535
_SMTPS_PORT: int = (source)

Smtps port value used by smtp_settings.

Value
465