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

Represent a configured storage disk.

The disk is the high-level entry point to a storage backend. It builds ~orionis.storage.file.File and ~orionis.storage.directory.Directory objects bound to its driver, and its convenience methods always delegate to those objects so no logic is ever duplicated.

Method __init__ Initialize the disk with its configuration name and driver.
Async Method copy Copy the file at source to target on this disk.
Async Method delete Delete the file at path from this disk.
Method directory Build a directory object for path on this disk.
Async Method exists Check whether a file exists at path on this disk.
Method file Build a file object for path on this disk.
Async Method move Move the file at source to target on this disk.
Method name Return the configuration name of the disk.
Async Method put Write contents to path on this disk.
Class Variable __slots__ Undocumented
Instance Variable _driver Undocumented
Instance Variable _name Undocumented
def __init__(self, name: str, driver: IStorageDriver): (source)

Initialize the disk with its configuration name and driver.

Parameters
name:strDisk name as declared in the filesystems configuration.
driver:IStorageDriverDriver instance backing the disk.
Returns
NoneUndocumented
async def copy(self, source: str, target: str) -> IFile: (source)

Copy the file at source to target on this disk.

Parameters
source:strRoot-relative path of the existing file.
target:strRoot-relative destination path.
Returns
IFileFile object pointing at the copy.
Raises
StorageFileNotFoundExceptionIf the source file does not exist.
async def delete(self, path: str) -> bool: (source)

Delete the file at path from this disk.

Parameters
path:strRoot-relative file path.
Returns
boolTrue if the file existed and was removed.
def directory(self, path: str = '') -> IDirectory: (source)

Build a directory object for path on this disk.

Parameters
path:strRoot-relative directory path. The empty string denotes the disk root.
Returns
IDirectoryDirectory object bound to this disk's driver.
Raises
StoragePathExceptionIf path is invalid or escapes the disk root.
async def exists(self, path: str) -> bool: (source)

Check whether a file exists at path on this disk.

Parameters
path:strRoot-relative file path.
Returns
boolTrue if a file exists at the given path.
def file(self, path: str) -> IFile: (source)

Build a file object for path on this disk.

Parameters
path:strRoot-relative file path.
Returns
IFileFile object bound to this disk's driver.
Raises
StoragePathExceptionIf path is invalid or resolves to the disk root.
async def move(self, source: str, target: str) -> IFile: (source)

Move the file at source to target on this disk.

Parameters
source:strRoot-relative path of the existing file.
target:strRoot-relative destination path.
Returns
IFileFile object pointing at the moved file.
Raises
StorageFileNotFoundExceptionIf the source file does not exist.
def name(self) -> str: (source)

Return the configuration name of the disk.

Returns
strDisk name as declared in the filesystems configuration.
async def put(self, path: str, contents: bytes | str, visibility: str | None = None) -> IFile: (source)

Write contents to path on this disk.

Parameters
path:strRoot-relative file path.
contents:bytes | strData to persist. Strings are encoded as UTF-8.
visibility:str | NoneVisibility to apply, or None for the medium default.
Returns
IFileFile object pointing at the written file.

Undocumented

Undocumented