aliyun_oss_storage_config.py 940 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. from typing import Optional
  2. from pydantic import Field
  3. from pydantic_settings import BaseSettings
  4. class AliyunOSSStorageConfig(BaseSettings):
  5. """
  6. Aliyun storage configs
  7. """
  8. ALIYUN_OSS_BUCKET_NAME: Optional[str] = Field(
  9. description="Aliyun OSS bucket name",
  10. default=None,
  11. )
  12. ALIYUN_OSS_ACCESS_KEY: Optional[str] = Field(
  13. description="Aliyun OSS access key",
  14. default=None,
  15. )
  16. ALIYUN_OSS_SECRET_KEY: Optional[str] = Field(
  17. description="Aliyun OSS secret key",
  18. default=None,
  19. )
  20. ALIYUN_OSS_ENDPOINT: Optional[str] = Field(
  21. description="Aliyun OSS endpoint URL",
  22. default=None,
  23. )
  24. ALIYUN_OSS_REGION: Optional[str] = Field(
  25. description="Aliyun OSS region",
  26. default=None,
  27. )
  28. ALIYUN_OSS_AUTH_VERSION: Optional[str] = Field(
  29. description="Aliyun OSS authentication version",
  30. default=None,
  31. )