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

Represent the security-related configuration for HTTP.

Method __addHostToAllowedHosts Add a host to the list if it is missing.
Method __extractHostFromUrl Extract the hostname from a URL-like value.
Method __isLocalHost Return whether the host is local-only.
Method __post_init__ Validate security-related fields.
Method __validateAllowedHosts Validate the allowed_hosts field.
Instance Variable allowed_hosts List of allowed host names or '*' to allow all hosts.

Inherited from BaseEntity:

Class Method _cachedFieldMetadata Retrieve field definitions and normalized types cached by class.
Method __init__ Initialize declared fields and public extra attributes.
Method _dynamicAttributes Return public instance attributes that are not declared fields.
Method _validateExtraNames Validate names and storage for public extra attributes.
Method getFields Describe declared fields and, optionally, dynamic attributes.
Method toDict Return a recursively copied dictionary of declared and extra values.
Class Variable __slots__ Declare that this class introduces no additional instance slots.
Class Variable _orionis_field_metadata Cache declared fields and normalized type names for each concrete class.
def __addHostToAllowedHosts(self, hosts: list[str], host: str): (source)

Add a host to the list if it is missing.

Parameters
hosts:list[str]Current allowed hosts list.
host:strHost to add.
Returns
NoneAdd a host to the list if it is missing.
def __extractHostFromUrl(self, url: str) -> str: (source)

Extract the hostname from a URL-like value.

Parameters
url:strURL or host string.
Returns
strNormalized hostname, or an empty string if it cannot be parsed.
def __isLocalHost(self, host: str) -> bool: (source)

Return whether the host is local-only.

Parameters
host:strHost to evaluate.
Returns
boolTrue when the host should not be added automatically.
def __post_init__(self): (source)

Validate security-related fields.

Returns
NoneValidate security-related fields.
Raises
TypeErrorIf any field has an unexpected type.
def __validateAllowedHosts(self): (source)

Validate the allowed_hosts field.

Returns
NoneValidate the allowed_hosts field.
Raises
TypeErrorIf the value is not a list of strings or the literal '*'.
allowed_hosts: list[str] | typing.Literal["*"] = (source)

List of allowed host names or '*' to allow all hosts.