tencent_cos_storage_config.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. from typing import Optional
  2. from pydantic import Field
  3. from pydantic_settings import BaseSettings
  4. class TencentCloudCOSStorageConfig(BaseSettings):
  5. """
  6. Configuration settings for Tencent Cloud Object Storage (COS)
  7. """
  8. TENCENT_COS_BUCKET_NAME: Optional[str] = Field(
  9. description="Name of the Tencent Cloud COS bucket to store and retrieve objects",
  10. default=None,
  11. )
  12. TENCENT_COS_REGION: Optional[str] = Field(
  13. description="Tencent Cloud region where the COS bucket is located (e.g., 'ap-guangzhou')",
  14. default=None,
  15. )
  16. TENCENT_COS_SECRET_ID: Optional[str] = Field(
  17. description="SecretId for authenticating with Tencent Cloud COS (part of API credentials)",
  18. default=None,
  19. )
  20. TENCENT_COS_SECRET_KEY: Optional[str] = Field(
  21. description="SecretKey for authenticating with Tencent Cloud COS (part of API credentials)",
  22. default=None,
  23. )
  24. TENCENT_COS_SCHEME: Optional[str] = Field(
  25. description="Protocol scheme for COS requests: 'https' (recommended) or 'http'",
  26. default=None,
  27. )