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

Undocumented

Method __collectFiles Collect monitored files for hashing and deduplicate them.
Method __collectFromDirs Collect deduplicated Python files from monitored directories.
Method __collectFromFiles Add deduplicated monitored files to the result list.
Method __computeSourcesHash Compute and return a hash representing the state of monitored sources.
Method __init__ Initialize the FileBasedCache instance.
Method clear Remove the cache file if it exists.
Method get Retrieve cached data if valid.
Method save Save the provided data to the cache file if it has changed.
Constant CACHE_VERSION Undocumented
Class Variable __slots__ Undocumented
Instance Variable __file Undocumented
Instance Variable __file_resolved Undocumented
Instance Variable __hashInterval Undocumented
Instance Variable __lasthashcheck Undocumented
Instance Variable __monitored_dirs Undocumented
Instance Variable __monitored_files Undocumented
Instance Variable __path Undocumented
Instance Variable __sourceshashcache Undocumented
def __collectFiles(self) -> list[tuple[str, Path]]: (source)

Collect monitored files for hashing and deduplicate them.

Gather Python files from monitored directories and explicit monitored files, excluding the cache file itself.

Returns
list[tuple[str, Path]]Sorted (posix_path, resolved_path) pairs for unique monitored files.
def __collectFromDirs(self, cache_file: Path, seen: set[str], result: list[tuple[str, Path]]): (source)

Collect deduplicated Python files from monitored directories.

Parameters
cache_file:PathResolved cache file path to exclude from collection.
seen:set[str]Set of already collected POSIX paths used for deduplication.
result:list[tuple[str, Path]]Output list updated in place with (posix_path, resolved_path) tuples.
Returns
NoneThis method updates result in place.
def __collectFromFiles(self, cache_file: Path, seen: set[str], result: list[tuple[str, Path]]): (source)

Add deduplicated monitored files to the result list.

Parameters
cache_file:PathResolved cache file path to exclude from collection.
seen:set[str]Set of already collected POSIX paths used for deduplication.
result:list[tuple[str, Path]]Output list updated in place with (posix_path, resolved_path) tuples.
Returns
NoneThis method updates result in place.
def __computeSourcesHash(self) -> str: (source)

Compute and return a hash representing the state of monitored sources.

This method generates a SHA-1 hash based on the modification time and size of all monitored files and Python files in monitored directories, excluding the cache file itself. The hash is cached for a short interval to avoid redundant computation.

Returns
strThe computed SHA-1 hash as a hexadecimal string.
def __init__(self, path: Path, filename: str, monitored_dirs: list[Path] | None = None, monitored_files: list[Path] | None = None): (source)

Initialize the FileBasedCache instance.

Parameters
path:PathDirectory path where the cache file will be stored.
filename:strName of the cache file.
monitored_dirs:list[Path] or None, optionalList of directories to monitor for changes.
monitored_files:list[Path] or None, optionalList of files to monitor for changes.
Returns
NoneThis method does not return a value.
def clear(self) -> bool: (source)

Remove the cache file if it exists.

Returns
boolTrue if the cache file was removed, False if it did not exist.
def get(self) -> dict | None: (source)

Retrieve cached data if valid.

Returns
dict or NoneThe cached data if valid, otherwise None.
def save(self, data: dict) -> tuple[int, str]: (source)

Save the provided data to the cache file if it has changed.

Parameters
data:dictThe data to be cached.
Returns
tuple[int, str]A tuple containing the cache version and the sources hash.
CACHE_VERSION: int = (source)

Undocumented

Value
1
__slots__: tuple[str, ...] = (source)

Undocumented

Undocumented

__file_resolved = (source)

Undocumented

__hashInterval: float = (source)

Undocumented

__lasthashcheck: float = (source)

Undocumented

__monitored_dirs = (source)

Undocumented

__monitored_files = (source)

Undocumented

Undocumented

__sourceshashcache: str | None = (source)

Undocumented