From 8771d105bb9f9fd55e7db8a04bb1b3b736279260 Mon Sep 17 00:00:00 2001 From: Zichao Lin Date: Sat, 18 Jul 2026 09:13:01 +0800 Subject: [PATCH] chore(deps): add boto3 to requirements.txt --- app/storage.py | 8 +++++++- requirements.txt | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/storage.py b/app/storage.py index 03d419e..b9bf4ab 100644 --- a/app/storage.py +++ b/app/storage.py @@ -88,7 +88,13 @@ class S3Storage: region: str = "auto", public_url: str = "", ) -> None: - import boto3 + try: + import boto3 + except ImportError: + raise ImportError( + "boto3 is required for S3 storage. " + "Install it with: pip install boto3" + ) self.bucket = bucket self.public_url = public_url.rstrip("/") diff --git a/requirements.txt b/requirements.txt index ae631c7..96a5d08 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,3 +6,4 @@ jinja2 bcrypt python-jose[cryptography] aiofiles +boto3