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 Cors(BaseEntity): (source)
Represent a CORS configuration compatible with Starlette CORSMiddleware.
| Method | __post |
Validate CORS options and own the supplied mutable lists. |
| Method | __validate |
Validate that all items in 'allow_methods' are valid HTTP methods or a wildcard. |
| Instance Variable | allow |
Whether to allow credentials (cookies, authorization headers, etc.). Defaults to False. |
| Instance Variable | allow |
List of allowed HTTP headers. Defaults to []. Use ["*"] to allow all headers. |
| Instance Variable | allow |
List of allowed HTTP methods. Defaults to []. Use ["*"] to allow all methods. |
| Instance Variable | allow |
Regular expression to match allowed origins. Defaults to None. |
| Instance Variable | allow |
List of allowed origins. Defaults to []. Use ["*"] to allow all origins. |
| Instance Variable | expose |
List of headers exposed to the browser. Defaults to []. |
| Instance Variable | max |
Maximum time (in seconds) for the preflight request to be cached. Defaults to 600. |
Inherited from BaseEntity:
| Class Method | _cached |
Retrieve field definitions and normalized types cached by class. |
| Method | get |
Describe field names, normalized types, defaults, and metadata. |
| Method | to |
Convert the dataclass instance to a recursively copied dictionary. |
| Class Variable | __slots__ |
Undocumented |
Validate CORS options and own the supplied mutable lists.
| Returns | |
None | This method does not return a value. |
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 | |
None | This method does not return a value. |
| Raises | |
TypeError | If any item in 'allow_methods' is not a string. |
ValueError | If any item is not a valid HTTP method or the wildcard. |