You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

vikingdb_config.py 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. from pydantic import Field
  2. from pydantic_settings import BaseSettings
  3. class VikingDBConfig(BaseSettings):
  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: str | None = 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: str | None = 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. )