aliyun_oss_storage_config.py 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. from typing import Optional
  2. from pydantic import Field
  3. from pydantic_settings import BaseSettings
  4. class AliyunOSSStorageConfig(BaseSettings):
  5. """
  6. Configuration settings for Aliyun Object Storage Service (OSS)
  7. """
  8. ALIYUN_OSS_BUCKET_NAME: Optional[str] = Field(
  9. description="Name of the Aliyun OSS bucket to store and retrieve objects",
  10. default=None,
  11. )
  12. ALIYUN_OSS_ACCESS_KEY: Optional[str] = Field(
  13. description="Access key ID for authenticating with Aliyun OSS",
  14. default=None,
  15. )
  16. ALIYUN_OSS_SECRET_KEY: Optional[str] = Field(
  17. description="Secret access key for authenticating with Aliyun OSS",
  18. default=None,
  19. )
  20. ALIYUN_OSS_ENDPOINT: Optional[str] = Field(
  21. description="URL of the Aliyun OSS endpoint for your chosen region",
  22. default=None,
  23. )
  24. ALIYUN_OSS_REGION: Optional[str] = Field(
  25. description="Aliyun OSS region where your bucket is located (e.g., 'oss-cn-hangzhou')",
  26. default=None,
  27. )
  28. ALIYUN_OSS_AUTH_VERSION: Optional[str] = Field(
  29. description="Version of the authentication protocol to use with Aliyun OSS (e.g., 'v4')",
  30. default=None,
  31. )
  32. ALIYUN_OSS_PATH: Optional[str] = Field(
  33. description="Base path within the bucket to store objects (e.g., 'my-app-data/')",
  34. default=None,
  35. )