CLI tooling to scaffold and manage Python Queued Message Handler projects
Project description
pyqmh-tools
Scaffolding and maintenance utilities for building a Python Queued Message Handler (QMH) project.
This repository is intended to be published as a PyPI package so the tooling can be installed with pip and used as project commands.
Installation
Install from PyPI (after publish):
pip install pyqmh-tools
Commands
This package provides three main commands:
pyqmh_project_initpyqmh_module_addpyqmh_module_remove
Note: if you see pyqmg-module-remove elsewhere, treat that as a typo. The command name in this project is pyqmh_module_remove.
pyqmh_project_init
Initializes a new QMH project in the current directory.
What it does:
- Creates
src/andsrc/modules/if they do not already exist. - Creates
src/modules/__init__.pyif missing. - Copies template
app.pyintosrc/app.pyif it does not already exist. - Prompts for app/project description (only when creating
app.py). - Fills template placeholders such as description/author.
- Creates root
.gitignorefrom template if.gitignoredoes not exist.
Run from your target project directory:
pyqmh_project_init
pyqmh_module_add
Adds a new module to src/modules, or adds a new implementation to an existing factory module.
Behavior summary:
- Prompts for module name first.
- If module already exists and is a factory module, prompts to add a new implementation.
- If module does not exist, prompts for module type:
standardfactoryrepository
standard creation:
- Creates
src/modules/<module_name>/module.pyfrom template. - Creates module
__init__.pyfrom template with imports/exports. - Updates
src/modules/__init__.pyimport and__all__(if file exists). - Updates
src/app.pyimport and constructor registration (if file exists).
factory creation:
- Creates
factory.py,base.py, andsimulated.pyfrom templates. - Creates module
__init__.pyfrom template with imports/exports. - Includes factory/base/simulated exports.
- Updates
src/modules/__init__.pyimport and__all__(if file exists). - Updates
src/app.pyimport and constructor registration (if file exists).
repository creation:
- Prompts for Git repository URL.
- Adds the repository as a Git submodule under
src/modules/<module_name>. - If repository URL is blank, falls back to template-based creation prompts.
Add new module:
pyqmh_module_add
pyqmh_module_remove
Removes an existing module from src/modules.
Behavior summary:
- Prints available modules before prompting.
- Accepts module name as folder name or CamelCase class name.
- Shows files to be removed and asks for confirmation.
- If module is a Git submodule:
- deinitializes submodule
- removes it from Git index
- removes submodule metadata
- If module is a regular folder:
- removes the folder directly
- Cleans up references after removal:
src/modules/__init__.pyimports and__all__src/app.pyimport and constructor registration
Remove module:
pyqmh_module_remove
Typical New Project Flow
From a new directory:
- Initialize project scaffold.
- Add one or more modules.
- Run app.
Example:
mkdir my-qmh-project
cd my-qmh-project
pyqmh_project_init
pyqmh_module_add
pyqmh_module_add
python src/app.py --debug
Development Notes
- Commands are designed to be run from the project root where
src/should exist. - The tools are idempotent for common setup steps (existing files/folders are generally preserved).
- Generated files are template-driven from
src/pyqmh_tools/assets.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyqmh_tools-0.0.1.tar.gz.
File metadata
- Download URL: pyqmh_tools-0.0.1.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
355f68af8387133766ba7c8fda38dca3bd786bd9ea5799a5ee19b84b2baf63f9
|
|
| MD5 |
a30af5d685d9e6c9717682fec8a255f5
|
|
| BLAKE2b-256 |
48c627cde8160caecd2f69a300917c58351f80fd10d04cc53a48b56712e0d26a
|
Provenance
The following attestation bundles were made for pyqmh_tools-0.0.1.tar.gz:
Publisher:
publish-to-pypi.yml on PCLabTools/pyqmh-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyqmh_tools-0.0.1.tar.gz -
Subject digest:
355f68af8387133766ba7c8fda38dca3bd786bd9ea5799a5ee19b84b2baf63f9 - Sigstore transparency entry: 1814304162
- Sigstore integration time:
-
Permalink:
PCLabTools/pyqmh-tools@24ee94000e24b1f95550e39f10685fb09dc53e34 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/PCLabTools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@24ee94000e24b1f95550e39f10685fb09dc53e34 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file pyqmh_tools-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pyqmh_tools-0.0.1-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d994fd8a6afa7478ba6be6d0639591fc855627eb3218607c4c99b9c6c7a4252
|
|
| MD5 |
9e1c36019837c9aec55a5182ea059dd5
|
|
| BLAKE2b-256 |
dd5d68ee6e2c8baf365a022ce094c868580d60f46815b894cef8eee4a62c417c
|
Provenance
The following attestation bundles were made for pyqmh_tools-0.0.1-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on PCLabTools/pyqmh-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyqmh_tools-0.0.1-py3-none-any.whl -
Subject digest:
0d994fd8a6afa7478ba6be6d0639591fc855627eb3218607c4c99b9c6c7a4252 - Sigstore transparency entry: 1814304285
- Sigstore integration time:
-
Permalink:
PCLabTools/pyqmh-tools@24ee94000e24b1f95550e39f10685fb09dc53e34 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/PCLabTools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@24ee94000e24b1f95550e39f10685fb09dc53e34 -
Trigger Event:
workflow_dispatch
-
Statement type: