# pyproject-template **Repository Path**: perfectnewer/pyproject-template ## Basic Information - **Project Name**: pyproject-template - **Description**: python project template - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-29 - **Last Updated**: 2026-05-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # pyproject-template A Python project template based on Copier for rapidly generating modern Python project structures. ## Project Overview This is a configurable Python project template that uses Copier to automatically generate project scaffolding. The generated project includes the following core features: - **FastAPI Web API** - Modern high-performance web framework (optional) - **gRPC Server** - High-performance RPC service - **Async Queue** - Asynchronous task queue - **Dependency Injection** - Dependency injection container - **Config Management** - Flexible configuration management - **Docker** - Containerized deployment support - **GitLab CI** - Continuous integration configuration ## Getting Started ### Prerequisites - Python 3.10+ - Copier - Git ### Generate Project ```bash copier copy https://gitee.com/perfectnewer/pyproject-template.git your_project_name ``` Follow the prompts to fill in configuration details: - `project_name` - Project name - `author` - Author name - `email` - Email address - `enable_webapi` - Enable Web API - `enable_grpc` - Enable gRPC - etc. ### Configuration Options | Option | Description | Default | |--------|-------------|---------| | `project_name` | Project name | - | | `author` | Author name | - | | `email` | Email address | - | | `enable_webapi` | Enable Web API | `yes` | | `enable_grpc` | Enable gRPC | `yes` | ## Project Structure The generated project structure is as follows: ``` your_project_name/ ├── {{project_name}}/ # Main application package │ ├── __init__.py │ ├── application/ # Application layer │ ├── async_queue/ # Async queue │ ├── config/ # Configuration management │ ├── grpc_server/ # gRPC server │ ├── scripts/ # Scripts │ ├── seedwork/ # Shared infrastructure │ │ ├── infrastructure/ │ │ └── web/ # Common web components │ ├── third_party/ # Third-party integrations │ └── webapi/ # Web API (optional) │ └── hello/ # Example module ├── deploy/ # Deployment configurations ├── tests/ # Test directory ├── pyproject.toml # Project configuration └── README.md # Project documentation ``` ## Development Guide ### Install Dependencies ```bash pip install -e ".[dev]" ``` ### Run Web API ```bash cd your_project_name uvicorn {{project_name}}.webapi.app:app --reload ``` ### Run gRPC Server ```bash cd your_project_name python -m {{project_name}}.grpc_server.main ``` ### Run Tests ```bash cd your_project_name pytest ``` ## Configuration Configuration is loaded via environment variables or configuration files, supporting multiple environments (development, testing, production). ## Deployment ### Docker Deployment ```bash docker build -t your_project_name . docker run -d -p 8000:8000 your_project_name ``` ### Using GitLab CI The project includes a `.gitlab-ci.yml` file. Pushing code triggers the automated CI/CD pipeline. ## Technology Stack - **FastAPI** - Web framework - **gRPC** - RPC communication - **Pydantic** - Data validation - **dependency-injector** - Dependency injection - **aio-pika** - Async RabbitMQ client ## License Please fill in the appropriate license based on the generated template.