Add your description here
- Dask distributed computing
- Loguru structured logging
- Ruff linting and formatting
- UV package management
- Click CLI support
- pydub audio processing
-
从 Git 仓库克隆模板:
copier copy <template-source> py-project-template
-
从本地目录克隆模板:
copier copy /path/to/local/template py-project-template
-
安装依赖:
cd py-project-template uv sync
- Dask 分布式计算
- Loguru 结构化日志
- Ruff 代码检查和格式化
- UV 包管理
- Click CLI 支持
# Start the development server
make dev
py-project-template/
├── config/
│ └── config.yaml # Configuration file
├── src/
│ ├── __init__.py
│ ├── app.py # Main application logic
│ ├── main.py # Entry point
│ └── utils/ # Utility modules
│ ├── __init__.py
│ ├── config.py # Configuration management
│ ├── custom_logging.py
│ ├── dask.py # Dask utilities
│ └── utils.py
├── Makefile # Common commands
├── pyproject.toml # Project configuration
├── copier.yml # Template configuration
└── README.md # This file
The configuration is managed through config/config.yaml
:
- HTTP Server: Port 13000
- Dask Cluster: Scheduler port 8786, Dashboard port 8787
- Logging: Level INFO, rotation 1 days, retention 5 days
# Lint code
uv run ruff check .
# Format code
uv run ruff format .
To enable testing, set include_tests: true
when generating the project.
This template uses the following variables:
Variable | Description | Default |
---|---|---|
project_name |
Project name | py-project-template |
project_description |
Project description | Add your description here |
author_name |
Author name | "" |
author_email |
Author email | "" |
python_version |
Python version | 3.12 |
use_dask |
Enable Dask | true |
use_click |
Enable Click CLI | true |
http_port |
HTTP server port | 13000 |
dask_scheduler_port |
Dask scheduler port | 8786 |
dask_dashboard_port |
Dask dashboard port | 8787 |
log_level |
Logging level | INFO |
log_rotation |
Log rotation period | 1 days |
log_retention |
Log retention period | 5 days |
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.