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.
Provide shared binary buffers, dependency loading and object-key helpers.
| Class | _ |
Enforce binary access modes while owning a buffered storage payload. |
| Function | __getattr__ |
Resolve and cache a legacy driver helper name. |
| Function | _close |
Close an unpublished buffer without replacing its opening failure. |
| Function | _directory |
Yield every directory prefix implied by key down to base. |
| Function | assert |
Validate a stream mode against the supported binary modes. |
| Function | derive |
Derive the directory paths implied by object keys under base. |
| Function | filter |
Select the object keys that represent files under base. |
| Function | import |
Import an optional SDK module required by a storage driver. |
| Function | resolve |
Resolve the local target path for a download operation. |
| Constant | _ALLOWED |
Binary modes accepted by driver open() implementations. |
| Constant | _LEGACY |
Legacy exports definitions used by functions. |
Resolve and cache a legacy driver helper name.
| Parameters | |
name:str | Attribute requested from this module. |
| Returns | |
object | Existing helper function bound to the requested name. |
| Raises | |
AttributeError | If the requested name is not a compatibility export. |
Close an unpublished buffer without replacing its opening failure.
| Parameters | |
buffer:typing.BinaryIO | Owned buffer that could not be returned to its caller. |
primary:BaseException | Original failure raised while preparing the buffer. |
| Returns | |
None | No return value. |
Yield every directory prefix implied by key down to base.
Markers (keys ending with /) name a directory directly, while file keys imply their parent chain.
| Parameters | |
key:str | Object key, relative to the disk root. |
base:str | Canonical directory path acting as the traversal floor. |
| Yields | |
str | Directory paths between key and base, exclusive. |
Validate a stream mode against the supported binary modes.
| Parameters | |
mode:str | Mode requested by the caller. |
| Returns | |
None | No return value. |
| Raises | |
orionis.storage.exceptions.UnsupportedStorageOperationException | If mode is not one of 'rb', 'wb', 'ab', 'rb+', 'wb+', or 'ab+'. |
Derive the directory paths implied by object keys under base.
Object stores have no physical directories: prefixes are inferred from the stored keys, and keys ending with / act as explicit directory markers.
| Parameters | |
keys:collections.abc.Iterable[str] | Object keys, relative to the disk root. |
base:str | Canonical directory path acting as the listing root. The empty string denotes the disk root. |
recursive:bool | When True, include all nested directories. |
| Returns | |
list[str] | Sorted directory paths under base. |
Select the object keys that represent files under base.
Keys ending with / are treated as directory markers and are always excluded.
| Parameters | |
keys:collections.abc.Iterable[str] | Object keys, relative to the disk root. |
base:str | Canonical directory path acting as the listing root. The empty string denotes the disk root. |
recursive:bool | When True, include files from all nested prefixes. |
| Returns | |
list[str] | Sorted file keys under base. |
Import an optional SDK module required by a storage driver.
Cloud drivers rely on the official SDK of each platform, which is not installed with the framework. This helper performs the import lazily and converts an unavailable import into a descriptive storage exception with installation instructions.
| Parameters | |
module:str | Dotted module path to import (e.g. 'boto3'). |
package:str | PyPI package that provides the module (e.g. 'boto3'). |
extra:str | Orionis extra that pulls the package (e.g. 's3'), used to suggest uv add 'orionis[extra]'. |
| Returns | |
types.ModuleType | The imported module. |
| Raises | |
orionis.storage.exceptions.MissingStorageDependencyException | If the module cannot be imported; retain the original import failure. |
Resolve the local target path for a download operation.
When destination points to an existing directory, the file keeps its original name inside that directory. Missing parent directories are created.
| Parameters | |
normalized:str | Canonical root-relative path of the remote file. |
destination:str | pathlib.Path | Local target file or existing directory. |
| Returns | |
pathlib.Path | Local path where the file must be written. |
Binary modes accepted by driver open() implementations.
| Value |
|
Legacy exports definitions used by functions.
| Value |
|