pyweb_template
Template for python web apps.
特性
- 构建工具链:hatchling + uv + ruff + pyrefly + pytest + coverage
- Python 版本:3.13 ~ 3.14
- 代码质量:pre-commit 钩子 + ruff lint/format,覆盖率阈值 95%
- CI/CD:GitHub Actions(lint + typecheck + 多版本测试 + 自动发布到 PyPI)
- 文档:Sphinx + ReadTheDocs(中文 zh_CN)
- 多版本测试:tox + tox-uv(py313, py314)
- 容器化:Dockerfile(含国内镜像源配置)
- Web 框架:FastAPI + uvicorn
- 项目结构:src layout + py.typed 类型标记
安装
pip install pyweb_template
或使用 uv:
uv add pyweb_template
快速上手
import pyweb_template
print(pyweb_template.__version__)
开发
# 安装开发依赖
uv sync --extra dev
# 运行测试(含覆盖率,阈值 95%)
uv run pytest -m "not slow" --cov=pyweb_template --cov-fail-under=95
# 类型检查
uv run pyrefly check .
# 代码风格
uv run ruff check src tests
uv run ruff format --check src tests
Make 快捷命令
项目提供 Makefile 封装常用操作,运行 make help 查看全部命令:
make sync # 安装开发依赖
make check # 全套门禁 (lint + typecheck + cov)
make build # 构建分发包
make clean # 清理构建产物
make bump PART=patch # 版本号 bump
文档
文档由 Sphinx 构建,托管在 ReadTheDocs:
# 本地构建文档
make doc
多版本测试
使用 tox 在多个 Python 版本(py313, py314)下运行测试:
make tox
许可证
MIT
Metadata
Release files for pyweb-template 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyweb_template-0.1.2.tar.gz | 150.0 kB | Without provenance | Details for pyweb_template-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyweb_template-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for pyweb_template-0.1.2-py3-none-any.whl |
Total release size: 172.0 kB
Release files / pyweb_template-0.1.2.tar.gz
| Download URL | pyweb_template-0.1.2.tar.gz |
|---|---|
| Size | 150.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17b9cdb5b0505b863e622095bd41c83c9d60df7a912cea5e6d077288bafa81f9
|
|
BLAKE2b-256 checksum How to use checksums |
9ad1300c99369648357d0bd17c68caad65103cf99a19a2c5be24d33be506946f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / pyweb_template-0.1.2-py3-none-any.whl
| Download URL | pyweb_template-0.1.2-py3-none-any.whl |
|---|---|
| Size | 22.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f4f3afd26ce36ffdf6a613717ba85c02e00496c49da4542076a8ea57e0084af2
|
|
BLAKE2b-256 checksum How to use checksums |
89bffb30ecb5dd7cf9cbc707f6d761790c08be6a93e035b1eca468d2ce1beb8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for pyweb-template 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.