1234567891011121314151617181920212223242526272829303132 |
- # -*- coding: utf-8 -*-
- """
- Created on 2023-11-09
- ---------
- @summary:
- ---------
- @author: Dzr
- """
- import platform
- from pathlib import Path
- import yaml
- __all__ = [
- 'mongo_conf',
- 'redis_conf',
- 'jy_proxy',
- ]
- if platform.system() not in ['Darwin', 'Windows']:
- ENV = 'dev.yaml'
- else:
- ENV = 'test.yaml'
- _base_path = Path(__file__).parent
- _yaml_conf = (_base_path / 'conf' / ENV).resolve()
- with open(_yaml_conf, encoding="utf-8") as f:
- _conf = yaml.safe_load(f)
- mongo_conf = _conf['mongo']
- redis_conf = _conf['redis']
- jy_proxy: dict = _conf['proxy']
|