feat: populate ImageKit environment variables from configuration before client initialization
Browse files- src/imagekit_utils.py +5 -1
src/imagekit_utils.py
CHANGED
|
@@ -15,7 +15,11 @@ def get_imagekit_client() -> Optional[ImageKit]:
|
|
| 15 |
if not private_key:
|
| 16 |
logger.warning("⚠️ ImageKit private key missing. Cannot initialize client.")
|
| 17 |
return None
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
return ImageKit(
|
| 20 |
private_key=private_key
|
| 21 |
)
|
|
|
|
| 15 |
if not private_key:
|
| 16 |
logger.warning("⚠️ ImageKit private key missing. Cannot initialize client.")
|
| 17 |
return None
|
| 18 |
+
|
| 19 |
+
os.environ["IMAGEKIT_PRIVATE_KEY"] = get_config_value("imagekit_private_key")
|
| 20 |
+
os.environ["IMAGEKIT_PUBLIC_KEY"] = get_config_value("imagekit_public_key")
|
| 21 |
+
os.environ["IMAGEKIT_URL_ENDPOINT"] = get_config_value("imagekit_url_endpoint")
|
| 22 |
+
|
| 23 |
return ImageKit(
|
| 24 |
private_key=private_key
|
| 25 |
)
|