relyt_config.py 998 B

1234567891011121314151617181920212223242526272829303132333435
  1. from typing import Optional
  2. from pydantic import Field, PositiveInt
  3. from pydantic_settings import BaseSettings
  4. class RelytConfig(BaseSettings):
  5. """
  6. Configuration settings for Relyt database
  7. """
  8. RELYT_HOST: Optional[str] = Field(
  9. description="Hostname or IP address of the Relyt server (e.g., 'localhost' or 'relyt.example.com')",
  10. default=None,
  11. )
  12. RELYT_PORT: PositiveInt = Field(
  13. description="Port number on which the Relyt server is listening (default is 9200)",
  14. default=9200,
  15. )
  16. RELYT_USER: Optional[str] = Field(
  17. description="Username for authenticating with the Relyt database",
  18. default=None,
  19. )
  20. RELYT_PASSWORD: Optional[str] = Field(
  21. description="Password for authenticating with the Relyt database",
  22. default=None,
  23. )
  24. RELYT_DATABASE: Optional[str] = Field(
  25. description="Name of the Relyt database to connect to (default is 'default')",
  26. default="default",
  27. )