refactor: assembling the app features in modular way (#9129)

Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
Bowen Liang
2024-11-30 23:05:22 +08:00
committed by GitHub
parent 3bc4dc58d7
commit 9b46b02717
30 changed files with 396 additions and 318 deletions

12
api/libs/version_utils.py Normal file
View File

@@ -0,0 +1,12 @@
import sys
def check_supported_python_version():
python_version = sys.version_info
if not ((3, 11) <= python_version < (3, 13)):
print(
"Aborted to launch the service "
f" with unsupported Python version {python_version.major}.{python_version.minor}."
" Please ensure Python 3.11 or 3.12."
)
raise SystemExit(1)