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
Define the contract for a configured storage disk.
A disk is the entry point to a storage backend. It builds
orionis.storage.contracts.IFile and
orionis.storage.contracts.IDirectory objects
bound to its driver and offers a small set of convenience methods
that always delegate to those objects.
| 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__ |
Declare that this class introduces no additional instance slots. |
overridden in
orionis.storage.DiskCopy the file at source to target on this disk.
| Parameters | |
source:str | Root-relative path of the existing file. |
target:str | Root-relative destination path. |
| Returns | |
orionis.storage.contracts.IFile | File object pointing at the copy. |
| Raises | |
orionis.storage.exceptions.StorageFileNotFoundException | If the source file does not exist. |
overridden in
orionis.storage.DiskBuild a directory object for path on this disk.
| Parameters | |
path:str | Root-relative directory path. The empty string denotes the disk root. |
| Returns | |
orionis.storage.contracts.IDirectory | Directory object bound to this disk's driver. |
overridden in
orionis.storage.DiskBuild a file object for path on this disk.
| Parameters | |
path:str | Root-relative file path. |
| Returns | |
orionis.storage.contracts.IFile | File object bound to this disk's driver. |
overridden in
orionis.storage.DiskMove the file at source to target on this disk.
| Parameters | |
source:str | Root-relative path of the existing file. |
target:str | Root-relative destination path. |
| Returns | |
orionis.storage.contracts.IFile | File object pointing at the moved file. |
| Raises | |
orionis.storage.exceptions.StorageFileNotFoundException | If the source file does not exist. |
overridden in
orionis.storage.DiskReturn the configuration name of the disk.
| Returns | |
str | Disk name as declared in the filesystems configuration. |
@abstractmethod
async def put(self, path: str, contents: bytes | str, visibility: str | None = None) -> IFile:
(source)
¶
overridden in
orionis.storage.DiskWrite contents to path on this disk.
| Parameters | |
path:str | Root-relative file path. |
contents:bytes | str | Data to persist. Strings are encoded as UTF-8. |
visibility:str | None | Visibility to apply, or None for the medium default. |
| Returns | |
orionis.storage.contracts.IFile | File object pointing at the written file. |