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 IStorageDriver(ABC): (source)
Known subclasses: orionis.storage.drivers.AzureStorageDriver, orionis.storage.drivers.GoogleStorageDriver, orionis.storage.drivers.LocalStorageDriver, orionis.storage.drivers.MemoryStorageDriver, orionis.storage.drivers.S3StorageDriver
Define the low-level contract every storage backend must implement.
A driver translates canonical root-relative paths into operations
against a physical medium (local disk, memory, S3, Azure, GCS...).
Drivers contain no business logic; higher-level behavior lives
in ~orionis.storage.file.File,
~orionis.storage.directory.Directory, and
~orionis.storage.disk.Disk. User code never interacts with
a driver directly.
| Async Method | copy |
Copy the file at source to target. |
| Async Method | create |
Create the directory at path, including missing parents. |
| Async Method | delete |
Delete the file at path. |
| Async Method | delete |
Recursively delete the directory at path. |
| Async Method | directories |
List the directory paths contained in the directory at path. |
| Async Method | directory |
Check whether a directory exists at path. |
| Async Method | download |
Copy the file at path to a location on the local filesystem. |
| Async Method | exists |
Check whether a file exists at path. |
| Async Method | files |
List the file paths contained in the directory at path. |
| Async Method | hash |
Compute the content hash of the file at path. |
| Async Method | info |
Collect a metadata snapshot for the file at path. |
| Async Method | last |
Return the last-modification timestamp of the file at path. |
| Async Method | mime |
Guess the MIME type of the file at path. |
| Async Method | move |
Move the file at source to target. |
| Method | open |
Open an asynchronous binary stream for the file at path. |
| Async Method | read |
Read the full contents of the file at path. |
| Method | read |
Stream the contents of the file at path in chunks. |
| Async Method | set |
Change the visibility of the file at path. |
| Async Method | size |
Return the size in bytes of the file at path. |
| Async Method | temporary |
Build a signed, time-limited URL for the file at path. |
| Async Method | url |
Build the public URL for the file at path. |
| Async Method | visibility |
Return the visibility of the file at path. |
| Async Method | write |
Write contents to path, replacing any existing file. |
| Async Method | write |
Write the chunks produced by stream to path. |
| Class Variable | __slots__ |
Undocumented |
str = '', *, recursive: bool = False) -> list[ str]:
(source)
¶
orionis.storage.drivers.AzureStorageDriver, orionis.storage.drivers.GoogleStorageDriver, orionis.storage.drivers.LocalStorageDriver, orionis.storage.drivers.MemoryStorageDriver, orionis.storage.drivers.S3StorageDriverCopy the file at path to a location on the local filesystem.
| Parameters | |
path:str | Root-relative file path on the disk. |
destination:str | Path | Local target. When it points to an existing directory the file keeps its original name inside that directory. |
| Returns | |
Path | Absolute local path of the downloaded file. |
| Raises | |
StorageFileNotFoundException | If the file does not exist. |
str = '', *, recursive: bool = False) -> list[ str]:
(source)
¶
orionis.storage.drivers.AzureStorageDriver, orionis.storage.drivers.GoogleStorageDriver, orionis.storage.drivers.LocalStorageDriver, orionis.storage.drivers.MemoryStorageDriver, orionis.storage.drivers.S3StorageDriverCompute the content hash of the file at path.
| Parameters | |
path:str | Root-relative file path. |
algorithm:str | Any algorithm name accepted by hashlib.new. |
| Returns | |
str | Hexadecimal digest of the file contents. |
| Raises | |
StorageFileNotFoundException | If the file does not exist. |
orionis.storage.drivers.AzureStorageDriver, orionis.storage.drivers.GoogleStorageDriver, orionis.storage.drivers.LocalStorageDriver, orionis.storage.drivers.MemoryStorageDriver, orionis.storage.drivers.S3StorageDriverGuess the MIME type of the file at path.
| Parameters | |
path:str | Root-relative file path. |
| Returns | |
str | None | MIME type, or None when it cannot be determined. |
orionis.storage.drivers.AzureStorageDriver, orionis.storage.drivers.GoogleStorageDriver, orionis.storage.drivers.LocalStorageDriver, orionis.storage.drivers.MemoryStorageDriver, orionis.storage.drivers.S3StorageDriverOpen an asynchronous binary stream for the file at path.
| Parameters | |
path:str | Root-relative file path. |
mode:str | Binary mode: 'rb', 'wb', 'ab', 'rb+', 'wb+', or 'ab+'. |
| Returns | |
IStorageStream | Lazily opened stream; use it as an async context manager. |
| Raises | |
UnsupportedStorageOperationException | If mode is not a supported binary mode. |
str, chunk_size: int = 65536) -> AsyncIterator[ bytes]:
(source)
¶
str, contents: bytes | str, visibility: str | None = None):
(source)
¶
str, stream: AsyncIterable[ bytes], visibility: str | None = None):
(source)
¶