Config Module

class config.config.Config

Bases: object

ACCOUNT_ID: str = '12016691'
API_KEY: str = None
API_VERSION: str = '3'
AUTH_TOKEN: str = None
BASE_URL: str = 'https://api.themoviedb.org'
MOVIE_ID: str = '346698'
REQUEST_TOKEN: str = None
SESSION_ID: str = None
TIMEOUT: int = 30
USER_ACCESS_TOKEN: str = None
classmethod validate(required: List[str] = None) None
config.config.configure_logging()

Configure loguru logger with custom format and log level.

Removes the default loguru handler and adds a new one with: - Colored output to stderr - Custom format: timestamp | level | module:function:line - message - Log level from LOG_LEVEL environment variable (defaults to INFO) - Optional file logging when LOG_TO_FILE is set to “True”

Log levels (threshold-based, shows specified level and above):
  • DEBUG: Detailed diagnostic information

  • INFO: General operational messages (default)

  • WARNING: Potential issues

  • ERROR: Error events

  • CRITICAL: Serious failures

Can be called multiple times to reconfigure logging (e.g., after setting LOG_LEVEL environment variable in pytest_configure).

Returns:

None

Example:

os.environ[“LOG_LEVEL”] = “DEBUG” os.environ[“LOG_TO_FILE”] = “True” configure_logging() # Now shows DEBUG and above, also logs to file