async_storages.integrations¶
- class async_storages.integrations.sqlalchemy.FileType(storage: BaseStorage, *args: Any, **kwargs: Any)[source]¶
Bases:
TypeDecoratorSQLAlchemy column type for representing stored files.
This type integrates with
BaseStorageto automatically wrap database values (file names) intoStorageFileobjects when queried.- Parameters:
storage (BaseStorage) – The storage backend used to manage file operations.
args – Additional positional arguments passed to
TypeDecorator.kwargs – Additional keyword arguments passed to
TypeDecorator.
- class async_storages.integrations.sqlalchemy.ImageType(storage: BaseStorage, *args: Any, **kwargs: Any)[source]¶
Bases:
FileTypeSQLAlchemy column type for representing stored image files.
This type extends
FileTypeto automatically wrap database values (image file names) intoStorageImageobjects when queried.It integrates with a configured
BaseStoragebackend to provide convenient access to image operations such as resizing, thumbnail generation, or metadata retrieval.- Parameters:
storage (BaseStorage) – The storage backend used to manage image file operations.
args – Additional positional arguments passed to
FileType.kwargs – Additional keyword arguments passed to
FileType.