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 |
Normalize allowlists, validate CORS options and own 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 ["*"] to allow all headers. |
| Instance Variable | allow |
List of allowed HTTP methods. Defaults to ["*"] 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 ["*"] 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 | __init__ |
Initialize declared fields and public extra attributes. |
| Method | _dynamic |
Return public instance attributes that are not declared fields. |
| Method | _validate |
Validate names and storage for public extra attributes. |
| Method | get |
Describe declared fields and, optionally, dynamic attributes. |
| Method | to |
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 |
Cache declared fields and normalized type names for each concrete class. |
Normalize allowlists, validate CORS options and own 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. |