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.
Coordinate disk resolution for the storage component.
The manager reads the filesystems configuration, builds
orionis.storage.Disk objects bound to their drivers,
and caches them per name. It knows nothing about files or
directories: that behavior lives in the domain objects returned by
each disk.
| Method | __build |
Instantiate the driver for the disk named name. |
| Method | __build |
Build a local driver from a disk configuration entity. |
| Method | __disk |
Return the configuration entity for the disk named name. |
| Method | __init__ |
Initialize the manager and resolve the active configuration. |
| Method | default |
Resolve the default disk from the configuration. |
| Method | disk |
Resolve the disk registered under name. |
| Method | extend |
Register a custom driver factory under driver. |
| Method | uploaded |
Wrap an HTTP multipart payload as a storable uploaded file. |
| Class Variable | __slots__ |
Declare the instance attribute slots reserved by this class. |
| Instance Variable | _app |
Application container used to read the configuration and the base path. |
| Instance Variable | _base |
Base path obtained from app.basePath. |
| Instance Variable | _config |
Validated configuration used to construct and operate the service. |
| Instance Variable | _custom |
Custom implementations registered by the application. |
| Instance Variable | _default |
Value used when the client omits this argument. |
| Instance Variable | _disks |
Storage disks cached after their first resolution. |
| Instance Variable | _lock |
Serialize disk publication while allowing nested synchronous factories. |
Instantiate the driver for the disk named name.
| Parameters | |
name:str | Disk name as declared in the filesystems configuration. |
| Returns | |
orionis.storage.contracts.IStorageDriver | Configured driver instance. |
| Raises | |
orionis.storage.exceptions.DiskNotFoundException | If the disk is not declared in the configuration. |
orionis.storage.exceptions.DriverNotSupportedException | If the disk references a driver with no implementation. |
Build a local driver from a disk configuration entity.
| Parameters | |
config:object | Disk configuration entity exposing path and, optionally, url. |
| Returns | |
orionis.storage.contracts.IStorageDriver | Local driver rooted inside the application base path. |
Return the configuration entity for the disk named name.
| Parameters | |
name:str | Disk name as declared in the filesystems configuration. |
| Returns | |
object | Disk configuration entity. |
| Raises | |
orionis.storage.exceptions.DiskNotFoundException | If the disk is not declared in the configuration. |
Initialize the manager and resolve the active configuration.
| Parameters | |
app:orionis.IApplication | Application container used to read the configuration and the base path. |
| Returns | |
None | No return value. |
Resolve the default disk from the configuration.
| Returns | |
orionis.storage.contracts.IDisk | The disk configured as default. |
| Raises | |
orionis.storage.exceptions.DiskNotFoundException | If the default disk is not declared in the configuration. |
Resolve the disk registered under name.
Build and publish a single disk on first access, including concurrent calls. A synchronous custom factory may resolve another configured disk. Subsequent calls reuse the published instance without taking the lock.
| Parameters | |
name:str | None | Disk name as declared in the filesystems configuration, or None for the default disk. |
| Returns | |
orionis.storage.contracts.IDisk | Disk bound to its configured driver. |
| Raises | |
orionis.storage.exceptions.DiskNotFoundException | If the disk is not declared in the configuration. |
orionis.storage.exceptions.DriverNotSupportedException | If the disk references a driver with no implementation. |
Register a custom driver factory under driver.
The factory receives the disk configuration entity and must return a ready-to-use driver instance. Registering a factory clears the disk cache so new resolutions pick it up.
| Parameters | |
driver:str | Driver name as referenced by disk configurations. |
factory:typing.Callable[[object], contracts.IStorageDriver] | Callable building the driver from a disk configuration. |
| Returns | |
None | No return value. |
Wrap an HTTP multipart payload as a storable uploaded file.
| Parameters | |
source:orionis.http.payload.contracts.uploaded_file.IUploadedFile | Buffered multipart payload produced by the HTTP layer. |
| Returns | |
orionis.storage.contracts.IUploadedFile | Uploaded file bound to this manager for disk resolution. |