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.
Undocumented
| Function | _compact |
Build a compact representation of one traceback frame. |
| Function | _compact |
Build a bounded header for the diagnostic prompt. |
| Function | _compact |
Build a compact prompt when the full traceback does not fit. |
| Function | _encode |
Encode a bounded UTF-8 prefix or suffix. |
| Function | _encode |
Encode a field and mark any truncation. |
| Function | _frame |
Yield frame locations and optional source lines. |
| Function | _header |
Yield the diagnostic request and exception fields. |
| Function | _prompt |
Yield the diagnostic header and captured frames. |
| Function | _try |
Encode a prompt only when all fields fit within the limit. |
| Function | build |
Build a compact, encoded diagnostic link within a local URL budget. |
| Constant | _CHATGPT |
Undocumented |
| Constant | _ESCAPE |
Undocumented |
| Constant | _FRAME |
Undocumented |
| Constant | _MIN |
Undocumented |
| Constant | _PROMPT |
Undocumented |
| Constant | _PROMPT |
Undocumented |
| Constant | _SOURCE |
Undocumented |
| Constant | _TRUNCATION |
Undocumented |
| Constant | CHATGPT |
Undocumented |
dict[ str, Any], locale: str, request_method: str, request_path: str) -> str:
(source)
¶
Build a compact prompt when the full traceback does not fit.
| Parameters | |
tracebackdict[str, Any] | Parsed exception data. |
locale:str | Requested response locale. |
requeststr | HTTP method associated with the request. |
requeststr | HTTP path associated with the request. |
| Returns | |
str | Encoded prompt within the configured URL budget. |
dict[ str, Any], locale: str, request_method: str, request_path: str) -> Iterator[ str]:
(source)
¶
Yield the diagnostic request and exception fields.
| Parameters | |
tracebackdict[str, Any] | Parsed exception data. |
locale:str | Requested response locale. |
requeststr | HTTP method associated with the request. |
requeststr | HTTP path associated with the request. |
| Returns | |
Iterator[str] | Individual unencoded header fields. |
dict[ str, Any], locale: str, request_method: str, request_path: str, *, sources: bool) -> Iterator[ str]:
(source)
¶
Yield the diagnostic header and captured frames.
| Parameters | |
tracebackdict[str, Any] | Parsed exception data. |
locale:str | Requested response locale. |
requeststr | HTTP method associated with the request. |
requeststr | HTTP path associated with the request. |
sources:bool | Whether to include failing source lines. |
| Returns | |
Iterator[str] | Unencoded prompt fields in traceback order. |
Iterable[ str], *, notice: str = '', prefix: str = '', limit: int = _PROMPT_BUDGET) -> str | None:
(source)
¶
Encode a prompt only when all fields fit within the limit.
| Parameters | |
parts:Iterable[str] | Prompt fields to encode. |
notice:str, optional | Limit notice appended to the prompt. |
prefix:str, optional | Already encoded prompt prefix. |
limit:int, optional | Maximum encoded prompt length. |
| Returns | |
str | None | Complete encoded prompt, or None when a field does not fit. |
dict[ str, Any], locale: str, request_method: str, request_path: str) -> tuple[ str, bool]:
(source)
¶
Build a compact, encoded diagnostic link within a local URL budget.
Include every captured frame and its failing source line when they fit. Otherwise omit source snippets before shortening fields or dropping the oldest frames. The limit is an application compatibility policy, not a published ChatGPT maximum. No request data is cached or transmitted here.
| Parameters | |
tracebackdict[str, Any] | ExceptionParser output, including frames in most-recent-first order. |
locale:str | Locale requested for the diagnostic response. |
requeststr | HTTP method associated with the failed request. |
requeststr | HTTP path associated with the failed request. |
| Returns | |
tuple[str, bool] | ASCII URL and whether source, fields, or frames were omitted. |
Undocumented
| Value |
|