P3G
🚀Python Packages Project Generator-Your next Python package needs a bleeding-edge project structure.
Install / Use
/learn @Undertone0809/P3GREADME
P3G - Python Packages Project Generator
<div align="center">Your next Python package needs a bleeding-edge project structure.
</div>This version is fork from https://github.com/TezRomacH/python-package-template. As a comparison, the current project provides better compatibility with Windows and faster lint construction. And a more lightweight way to create.
TL;DR
If you don't want to read the whole README, just click the Use this template button and start coding your Python package right now! 🚀
pip install p3g -U
p3g generate
📚 Documentation
For complete documentation, visit: https://p3g.zeeland.top
🚀 Features
In this cookiecutter 🍪 template we combine state-of-the-art libraries and best development practices for Python.
Development features
- Supports
Python 3.7and higher. Poetryas a dependencies manager. See configuration inpyproject.tomlandsetup.cfg.- Faster formatter tool, automatic codestyle with
ruffto replaceblack,isortandpyupgrade. - Ready-to-use
pre-commithooks with code-formatting. - Type checks with
ruff; docstring checks withdarglint; security checks withsafetyandbandit - Testing with
pytest. - Ready-to-use
.editorconfig,.dockerignore, and.gitignore. You don't have to worry about those things. - The ability of building docker.
Deployment features
GitHubintegration: issue and pr templates.Github Actionswith predefined build workflow as the default CI/CD.- Everything is already set up for security checks, codestyle checks, code formatting, testing, linting, docker builds, etc with
Makefile. More details in makefile-usage. - Dockerfile for your package.
- Always up-to-date dependencies with
@dependabot. You only need to enable it. - Automatic release notes with
Release Drafter. You may see the list of labels inrelease-drafter.yml. Works perfectly with Semantic Versions specification.
Open source community features
- Ready-to-use Pull Requests templates and several Issue templates.
- Files such as:
LICENSE,CONTRIBUTING.md,CODE_OF_CONDUCT.md, andSECURITY.mdare generated automatically. Stale botthat closes abandoned issues after a period of inactivity. (You will only need to setup free plan). Configuration is here.- Semantic Versions specification with
Release Drafter.
🤯 How to use it
Installation
To begin using the template consider updating p3g
pip install -U p3g
then go to a directory where you want to create your project and run:
p3g generate
Input variables
Template generator will ask you to fill some variables.
The input variables, with their default values:
| Parameter | Default value | Description |
|:---------------------:|:---------------------------:|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| project_name | python-project | Check the availability of possible name before creating the project. |
| project_description | based on the project_name | Brief description of your project. |
| organization | based on the project_name | Name of the organization. We need to generate LICENCE and to specify ownership in pyproject.toml. |
| license | MIT | One of MIT, BSD-3, GNU GPL v3.0 and Apache Software License 2.0. |
| minimal_python_version | 3.7 | Minimal Python version. One of 3.7, 3.8 and 3.9. It is used for builds, GitHub workflow and formatters (black, isort and pyupgrade). |
| github_name | based on the organization | GitHub username for hosting. Also used to set up README.md, pyproject.toml and template files for GitHub. |
| email | based on the organization | Email for CODE_OF_CONDUCT.md, SECURITY.md files and to specify the ownership of the project in pyproject.toml. |
| version | 0.1.0 | Initial version of the package. Make sure it follows the Semantic Versions specification. |
| line_length | 88 | The max length per line (used for codestyle with black and isort). NOTE: This value must be between 50 and 300. |
| using_tsinghua_mirror_source | false | The tsinghua poetry mirror source |
| create_example_template | cli | If cli is chosen generator will create simple CLI applic
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
