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.
Download and validate missing configuration before creating local files.
| Class Method | _blob |
Download raw bytes and verify GitHub's size and Git object hash. |
| Class Method | _create |
Create one validated resource and report whether it existed. |
| Class Method | _entries |
Validate the master tree and retain regular configuration entries. |
| Static Method | _download |
Read one successful GitHub response or identify the failed resource. |
| Static Method | _entry |
Order configuration entries by depth and then by path. |
| Static Method | _safe |
Reject links and traversal before writing any configuration resource. |
| Static Method | _select |
Select one configuration module using the validated remote tree. |
| Static Method | _validate |
Reject a local resource whose type conflicts with the official tree. |
| Method | __init__ |
Retain the application supplying the effective configuration path. |
| Method | bootstrap |
Restore selected configuration without replacing existing files. |
| Instance Variable | app |
Application supplying effective configuration paths. |
Download raw bytes and verify GitHub's size and Git object hash.
| Parameters | |
entry:dict[str, typing.Any] | Validated blob metadata from the official configuration tree. |
| Returns | |
bytes | Unmodified file contents matching the advertised size and hash. |
Path, kind: str, pending: dict[ Path, bytes]) -> bool:
(source)
¶
Create one validated resource and report whether it existed.
| Parameters | |
destination:pathlib.Path | Local configuration file or directory to create. |
kind:str | Expected Git tree entry type, either tree or blob. |
pending:dict[pathlib.Path, bytes] | Validated contents indexed by missing file destinations. |
| Returns | |
bool | Whether the resource already existed, including concurrent creation. |
Validate the master tree and retain regular configuration entries.
| Returns | |
list[dict[str, typing.Any]] | Valid configuration entries ordered with parent paths before children. |
Reject links and traversal before writing any configuration resource.
| Parameters | |
root:pathlib.Path | Effective configuration root containing all permitted destinations. |
destination:pathlib.Path | Local resource path to validate before writing. |
| Returns | |
None | Accept a destination contained within the root and free of links. |
Select one configuration module using the validated remote tree.
| Parameters | |
entries:list[dict[str, typing.Any]] | Validated configuration entries from the official master branch. |
file:str | Requested configuration module name without its Python extension. |
| Returns | |
list[dict[str, typing.Any]] | The single matching remote configuration file. |
| Raises | |
ValueError | If the name is absent, with the available remote names in the message. |
Reject a local resource whose type conflicts with the official tree.
| Parameters | |
destination:pathlib.Path | Local configuration resource to inspect. |
kind:str | Expected Git tree entry type, either tree or blob. |
| Returns | |
None | Accept an absent resource or an existing resource of the expected type. |
Retain the application supplying the effective configuration path.
| Parameters | |
app:orionis.IApplication | Application supplying effective configuration paths. |
| Returns | |
None | Store the application for subsequent recovery operations. |
Restore selected configuration without replacing existing files.
| Parameters | |
file:str | None, optional | Remote configuration name without the Python extension, or None to restore the complete configuration subtree. |
| Returns | |
list[tuple[str, str]] | Created or existing resources, relative to the application root. |
| Raises | |
RuntimeError | If GitHub cannot supply a complete, valid master configuration tree. |
ValueError | If the selected file is absent from the remote configuration options. |
OSError | If a local path is unsafe or cannot be created. |