vikingdb_config.py 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. from typing import Optional
  2. from pydantic import BaseModel, Field
  3. class VikingDBConfig(BaseModel):
  4. """
  5. Configuration for connecting to Volcengine VikingDB.
  6. Refer to the following documentation for details on obtaining credentials:
  7. https://www.volcengine.com/docs/6291/65568
  8. """
  9. VIKINGDB_ACCESS_KEY: Optional[str] = Field(
  10. description="The Access Key provided by Volcengine VikingDB for API authentication."
  11. "Refer to the following documentation for details on obtaining credentials:"
  12. "https://www.volcengine.com/docs/6291/65568",
  13. default=None,
  14. )
  15. VIKINGDB_SECRET_KEY: Optional[str] = Field(
  16. description="The Secret Key provided by Volcengine VikingDB for API authentication.",
  17. default=None,
  18. )
  19. VIKINGDB_REGION: str = Field(
  20. description="The region of the Volcengine VikingDB service.(e.g., 'cn-shanghai', 'cn-beijing').",
  21. default="cn-shanghai",
  22. )
  23. VIKINGDB_HOST: str = Field(
  24. description="The host of the Volcengine VikingDB service.(e.g., 'api-vikingdb.volces.com', \
  25. 'api-vikingdb.mlp.cn-shanghai.volces.com')",
  26. default="api-vikingdb.mlp.cn-shanghai.volces.com",
  27. )
  28. VIKINGDB_SCHEME: str = Field(
  29. description="The scheme of the Volcengine VikingDB service.(e.g., 'http', 'https').",
  30. default="http",
  31. )
  32. VIKINGDB_CONNECTION_TIMEOUT: int = Field(
  33. description="The connection timeout of the Volcengine VikingDB service.",
  34. default=30,
  35. )
  36. VIKINGDB_SOCKET_TIMEOUT: int = Field(
  37. description="The socket timeout of the Volcengine VikingDB service.",
  38. default=30,
  39. )