本站资源收集于互联网,不提供软件存储服务,每天免费更新优质的软件以及学习资源!

用于快速启动Polylith的Cookiecutter

网络教程 app 1℃

用于快速启动Polylith的Cookiecutter

向您展示一个python cookiecutter,用于在python 中快速启动polylith。如果您不知道什么是 polylith,请阅读文档,对于不耐烦的读者:

polylith 是一种软件架构,旨在构建简单、可维护、可测试和可扩展的后端系统。它通过在系统规模上应用功能思维来实现这一点,将代码视为可以组合成功能的构建块。

python-polylith 是允许我们在 python 中实现此功能的工具。

我不会详细介绍这种方法的优点。在本文中,我向您介绍诗歌-poly-cc,这是一个非常有主见的 cookiecutter,用于使用 python-polylith 启动项目。

您可以首先安装 cookiecutter 并使用以下命令生成项目:

cookiecutter github./ybenitezf/poetry-poly-cc.git

回答问题,你就很好了。你最终应该得到类似的结果:

.├── license├── readme.md├── bases├── build-packages.sh├── ponents├── development│   └── __init__.py├── poetry.toml├── projects├── pyproject.toml├── update-locks.sh└── workspace.toml

第一步包含在 readme.md 中:

安装诗歌:python-poetry.org/docs/#installation添加多晶工具:davidvujic.github.io/python-polylith-docs/installation/

奔跑

git initpoetry install# install pre-mit hookpoetry run pre-mit install# install pre-mit dependenciespoetry run pre-mit run -a

包含什么

    poetry 配置为在项目文件夹中创建 virtualenv(请参阅诗歌.toml)pytest 作为测试依赖项添加,还包括 pytest 的一些好东西:pytest-mock、pytest-cov 和 pytest-asyncio预提交和 ruff 作为开发依赖项。mypy 用于静态类型检查,与预提交集成支持脚本 build-packages.sh 和 update-locks.sh推荐的 vscode 扩展

以上就是用于快速启动 Polylith 的 Cookiecutter的详细内容,更多请关注范的资源库其它相关文章!

转载请注明:范的资源库 » 用于快速启动Polylith的Cookiecutter

喜欢 (0)