const.py 626 B

123456789101112131415161718192021222324
  1. # !/usr/bin/env python3
  2. # -*- coding: UTF-8 -*-
  3. ################################################################################
  4. #
  5. # Copyright (c) 2024 Baidu.com, Inc. All Rights Reserved
  6. #
  7. ################################################################################
  8. """
  9. 常量
  10. Authors: xiangyiqing(xiangyiqing@baidu.com)
  11. Date: 2024/3/26
  12. """
  13. import os
  14. CACHE_HONE = os.getenv("AISTUDIO_CACHE_HOME", default=os.getenv("HOME"))
  15. # token
  16. AUTH_DIR = f'{CACHE_HONE}/.cache/aistudio/.auth'
  17. AUTH_TOKEN_FILE = f'{AUTH_DIR}/token'
  18. # log level
  19. LOG_DIR = f'{CACHE_HONE}/.cache/aistudio/.log'
  20. LOG_LEVEL_FILE = f'{LOG_DIR}/level'