Skip to content

Poetry 管理依赖,使用 PyYAML 从 yml 读取配置,自定义 logging 生成日志,使用 APScheduler 和 py7zr 定时压缩归档日志。 Use Poetry to manage dependencies, read configuration from a YAML file using PyYAML, customize logging to generate logs, and use APScheduler and py7zr to periodically compress and archive logs.

License

Notifications You must be signed in to change notification settings

duanluan/py-poetry-config-log-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py-poetry-config-log-example

Poetry 管理依赖,使用 PyYAML 从 yml 读取配置,自定义 logging 生成日志,使用 APSchedulerpy7zr 定时压缩归档日志。

Use Poetry to manage dependencies, read configuration from a YAML file using PyYAML, customize logging to generate logs, and use APScheduler and py7zr to periodically compress and archive logs.

打包 Packaging EXE

首次构建 Initial Build

  • -F单文件 Single-file executable,-D单目录 Single-directory executable
  • -nexe 文件名 Specifies the name of the exe file
  • --add-data添加资源文件 Adds resource files
pyinstaller -D src/main/setup.py -n main --add-data "res;res"

通过 .spec 文件构建 Build Using a .spec File

  • --noconfirm无需确认是否覆盖上次构建的文件 No need to confirm whether to overwrite the last built file
pyinstaller main.spec --noconfirm

命令 Command

# 安装依赖 Install dependencies
poetry install

# 启动 Start the application
poetry run main

About

Poetry 管理依赖,使用 PyYAML 从 yml 读取配置,自定义 logging 生成日志,使用 APScheduler 和 py7zr 定时压缩归档日志。 Use Poetry to manage dependencies, read configuration from a YAML file using PyYAML, customize logging to generate logs, and use APScheduler and py7zr to periodically compress and archive logs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages