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 a CORS configuration compatible with Starlette CORSMiddleware.

Method __post_init__ Validate CORS options and own the supplied mutable lists.
Method __validateAllowMethods Validate that all items in 'allow_methods' are valid HTTP methods or a wildcard.
Instance Variable allow_credentials Whether to allow credentials (cookies, authorization headers, etc.). Defaults to False.
Instance Variable allow_headers List of allowed HTTP headers. Defaults to []. Use ["*"] to allow all headers.
Instance Variable allow_methods List of allowed HTTP methods. Defaults to []. Use ["*"] to allow all methods.
Instance Variable allow_origin_regex Regular expression to match allowed origins. Defaults to None.
Instance Variable allow_origins List of allowed origins. Defaults to []. Use ["*"] to allow all origins.
Instance Variable expose_headers List of headers exposed to the browser. Defaults to [].
Instance Variable max_age Maximum time (in seconds) for the preflight request to be cached. Defaults to 600.

Inherited from BaseEntity:

Class Method _cachedFieldMetadata Retrieve field definitions and normalized types cached by class.
Method getFields Describe field names, normalized types, defaults, and metadata.
Method toDict Convert the dataclass instance to a recursively copied dictionary.
Class Variable __slots__ Undocumented
def __post_init__(self): (source)

Validate CORS options and own the supplied mutable lists.

Returns
NoneThis method does not return a value.
def __validateAllowMethods(self): (source)

Validate that all items in 'allow_methods' are valid HTTP methods or a wildcard.

Checks that each entry in 'allow_methods' is a string and matches a valid HTTP method or is the wildcard '*'. Raises a TypeError or ValueError if invalid.

Returns
NoneThis method does not return a value.
Raises
TypeErrorIf any item in 'allow_methods' is not a string.
ValueErrorIf any item is not a valid HTTP method or the wildcard.
allow_credentials: bool = (source)

Whether to allow credentials (cookies, authorization headers, etc.). Defaults to False.

allow_headers: list[str] = (source)

List of allowed HTTP headers. Defaults to []. Use ["*"] to allow all headers.

allow_methods: list[str] = (source)

List of allowed HTTP methods. Defaults to []. Use ["*"] to allow all methods.

allow_origin_regex: str | None = (source)

Regular expression to match allowed origins. Defaults to None.

allow_origins: list[str] = (source)

List of allowed origins. Defaults to []. Use ["*"] to allow all origins.

expose_headers: list[str] = (source)

List of headers exposed to the browser. Defaults to [].

max_age: int | None = (source)

Maximum time (in seconds) for the preflight request to be cached. Defaults to 600.