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

Bound MCP work and explicitly allow trusted HTTP browser origins.

Read environment defaults when each instance is created. Explicit constructor values take precedence and supplied lists or tuples are copied to independent lists.

An absent Origin is accepted by the transport. An empty allowed_origins rejects every present Origin; there is no wildcard or implicit same-origin exception. Each allowed entry is a serialized HTTP(S) origin. Defaults come directly from the shared CORS_ALLOW_ORIGINS environment variable.

Method __post_init__ Reject coercion, unbounded budgets, and ambiguous origin allowlists.
Instance Variable allowed_origins Explicit trusted HTTP(S) browser origins without wildcards. Read CORS_ALLOW_ORIGINS with a default of an empty list.
Instance Variable default_page_size Default number of entries returned by paginated list operations. Read MCP_DEFAULT_PAGE_SIZE with a default of 50.
Instance Variable max_concurrent_requests Maximum concurrent MCP requests. Read MCP_MAX_CONCURRENT_REQUESTS, then HTTP_MAX_CONCURRENT_REQUESTS, with a final default of 32.
Instance Variable max_metadata_size Maximum serialized request or response metadata size in bytes. Read MCP_MAX_METADATA_SIZE with a default of 64 KiB.
Instance Variable max_page_size Maximum entries per page; must be at least default_page_size. Read MCP_MAX_PAGE_SIZE with a default of 100.
Instance Variable max_request_size Maximum serialized request size in bytes. Read MCP_MAX_REQUEST_SIZE, then HTTP_MAX_BODY_SIZE, with a final default of 1 MiB.
Instance Variable max_resource_subscriptions Maximum resource subscriptions per request or client context. Read MCP_MAX_RESOURCE_SUBSCRIPTIONS with a default of 64.
Instance Variable max_response_size Maximum serialized response size in bytes. Read MCP_MAX_RESPONSE_SIZE with a default of 4 MiB.
Instance Variable max_subscriptions Maximum total event-bus subscriptions. Read MCP_MAX_SUBSCRIPTIONS with a default of 1024.
Instance Variable subscription_buffer_size Maximum buffered events per subscription. Read MCP_SUBSCRIPTION_BUFFER_SIZE with a default of 64.
Instance Variable subscription_keepalive Finite positive interval in seconds between subscription keepalive messages. Read MCP_SUBSCRIPTION_KEEPALIVE with a default of 15.0.
Instance Variable tool_search_max_calls Maximum tool calls allowed in one catalog execution. Read MCP_TOOL_SEARCH_MAX_CALLS with a default of 5.
Instance Variable tool_search_max_output_bytes Maximum serialized tool catalog output size in bytes. Read MCP_TOOL_SEARCH_MAX_OUTPUT_BYTES with a default of 256 KiB.
Instance Variable tool_search_max_results Maximum results returned by a tool catalog search. Read MCP_TOOL_SEARCH_MAX_RESULTS with a default of 20.

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 __post_init__(self): (source)

Reject coercion, unbounded budgets, and ambiguous origin allowlists.

Returns
NoneRetain validated configuration with independently copied origin lists.
Raises
TypeErrorIf a budget, duration, or origin has an incompatible type.
ValueErrorIf a budget or duration is invalid, or an origin is malformed.
allowed_origins: list[str] = (source)

Explicit trusted HTTP(S) browser origins without wildcards. Read CORS_ALLOW_ORIGINS with a default of an empty list.

default_page_size: int = (source)

Default number of entries returned by paginated list operations. Read MCP_DEFAULT_PAGE_SIZE with a default of 50.

max_concurrent_requests: int = (source)

Maximum concurrent MCP requests. Read MCP_MAX_CONCURRENT_REQUESTS, then HTTP_MAX_CONCURRENT_REQUESTS, with a final default of 32.

max_metadata_size: int = (source)

Maximum serialized request or response metadata size in bytes. Read MCP_MAX_METADATA_SIZE with a default of 64 KiB.

max_page_size: int = (source)

Maximum entries per page; must be at least default_page_size. Read MCP_MAX_PAGE_SIZE with a default of 100.

max_request_size: int = (source)

Maximum serialized request size in bytes. Read MCP_MAX_REQUEST_SIZE, then HTTP_MAX_BODY_SIZE, with a final default of 1 MiB.

max_resource_subscriptions: int = (source)

Maximum resource subscriptions per request or client context. Read MCP_MAX_RESOURCE_SUBSCRIPTIONS with a default of 64.

max_response_size: int = (source)

Maximum serialized response size in bytes. Read MCP_MAX_RESPONSE_SIZE with a default of 4 MiB.

max_subscriptions: int = (source)

Maximum total event-bus subscriptions. Read MCP_MAX_SUBSCRIPTIONS with a default of 1024.

subscription_buffer_size: int = (source)

Maximum buffered events per subscription. Read MCP_SUBSCRIPTION_BUFFER_SIZE with a default of 64.

subscription_keepalive: float = (source)

Finite positive interval in seconds between subscription keepalive messages. Read MCP_SUBSCRIPTION_KEEPALIVE with a default of 15.0.

tool_search_max_calls: int = (source)

Maximum tool calls allowed in one catalog execution. Read MCP_TOOL_SEARCH_MAX_CALLS with a default of 5.

tool_search_max_output_bytes: int = (source)

Maximum serialized tool catalog output size in bytes. Read MCP_TOOL_SEARCH_MAX_OUTPUT_BYTES with a default of 256 KiB.

tool_search_max_results: int = (source)

Maximum results returned by a tool catalog search. Read MCP_TOOL_SEARCH_MAX_RESULTS with a default of 20.