gmscaffold
1. Preparing the Development Environment
1.1 Introduction
A scaffolding tool helps you quickly generate the basic structure of a project. With a simple command, it can automatically create project directories, configuration files, and initialization code, saving you the hassle of manual setup.
In this system, you can use the command-line tool gmcli to quickly create a standardized application project structure, enabling you to start development efficiently.
1.2 Environment Setup
Install Python Environment
-
Install Python 3.10 or later Visit the official Python website to download and install the appropriate version for your operating system.
⚠️ Currently, the scaffolding tool supports Python 3.10 and above only.
-
Install pip (Python package manager) Most systems come with pip pre-installed. If not, please refer to the official pip documentation for installation instructions.
1.3 Install the Scaffolding Tool
Install the CLI tool via pip:
pip3 install gmscaffold
Once installed, you can use the gmcli command to create your project.
2. Generate a Project with the Scaffold
2.1 Create a New Scaffolded Project
Run the following command to generate the project structure:
gmcli gm_app create_app
💡 Tip: The project will be created in the current working directory, so make sure you
cdinto the desired path first.
Example Output:
➜ ~ gmcli gm_app create_app
_/_/_/ _/ _/ _/_/_/ _/_/_/ _/ _/
_/ _/_/ _/_/ _/ _/ _/ _/
_/ _/_/ _/ _/ _/ _/_/ _/_/ _/_/_/_/
_/ _/ _/ _/ _/ _/ _/ _/
_/_/_/ _/ _/ _/_/_/ _/_/_/ _/ _/
Please enter the project name: example
Please enter the author name: xxx
Please enter contact email: xxx@163.com
Please enter the project version: 0.0.1
Please enter the project description: example
DEBUG:GmScaffold:[example] create_gm_app successfully
2.2 Command Parameters
| Parameter | Description |
|---|---|
gm_app create_app |
Create a new scaffolded project |
2.3 Project Structure
After execution, the following structure will be generated:
example/
├── app/
│ ├── consts/ # Constants (e.g., status codes, config keys)
│ ├── i18n/ # Internationalization (default: English & Chinese)
│ ├── middlewares/ # Middleware modules (e.g., auth, request handlers)
│ ├── schemas/ # Data validation schemas
│ ├── services/ # Business logic
│ ├── utils/ # Utility functions (e.g., logging, tools)
│ └── __init__.py
├── config.yaml # Configuration file (logs, ports, etc.)
├── install.sh # Optional install script (e.g., Redis, MySQL)
├── main.py # Application entry point
├── makefile # Build or packaging script
├── requirements.txt # Python dependencies list
├── .gitignore # Git ignore settings
├── ReadMe.md # Project documentation
Key File Descriptions:
main.py: Entry point of the applicationinstall.sh: Optional script to install external services (e.g., Redis, MySQL)config.yaml: Centralized configuration management (port, logs, DB, etc.)requirements.txt: Python dependencies list (can also usepoetry)
2.4 Usage & Extension
The generated project serves as a general-purpose API service template and can be extended for various business scenarios:
- ✅ Can be used with simplejrpc SDK to quickly build JSON-RPC services
- ✅ Also supports standalone use with custom business logic and structure
Metadata
Release files for gmscaffold 1.1.0
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 |
|---|---|---|---|---|
| gmscaffold-1.1.0.tar.gz | 113.2 kB | Without provenance | Details for gmscaffold-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gmscaffold-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for gmscaffold-1.1.0-py3-none-any.whl |
Total release size: 278.6 kB
Release files / gmscaffold-1.1.0.tar.gz
| Download URL | gmscaffold-1.1.0.tar.gz |
|---|---|
| Size | 113.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63d2d4f78c2334dee06c6fe76fcd26035c94dee4ee20c828fbde64a8a5fc0b26
|
|
BLAKE2b-256 checksum How to use checksums |
1759b05bfee7297fd4c5c98eaa290ac3d8f1c538c38962717898aba79007b5e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / gmscaffold-1.1.0-py3-none-any.whl
| Download URL | gmscaffold-1.1.0-py3-none-any.whl |
|---|---|
| Size | 165.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
326aadb27d7139d6d776fdf980c043384343158a53bd369307025bd2ffd1915d
|
|
BLAKE2b-256 checksum How to use checksums |
155677cd7f6a14d93b92f7c60f91ef2aa7ee9b1cce4e175fb06dc972baa7bcbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for gmscaffold 1.1.0
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.