pybasemkit
Python base module kit: YAML/JSON I/O, structured logging, CLI tooling, shell execution, and remote pydevd debug support.
| PyPi | |
| GitHub | |
| Code | |
| Docs |
Docs and Tutorials
CLI Tooling
basemkit.base_cmd.BaseCmd is the standard base class for every BITPlan
command line interface. It provides the house-standard options
-a/--about, -d/--debug, --debugServer/--debugPort (remote pydevd),
-f/--force, -q/--quiet, -v/--verbose and -V/--version plus
consistent exit codes (0 = OK, 1 = KeyboardInterrupt, 2 = Exception).
Downstream projects must subclass it instead of using plain argparse.
The canonical pattern - a Version dataclass and a BaseCmd subclass:
from dataclasses import dataclass
from basemkit.base_cmd import BaseCmd
import mytool
@dataclass
class Version:
"""Version information for mytool."""
name: str = "mytool"
version: str = mytool.__version__
date: str = "2026-08-02"
updated: str = "2026-08-02"
description: str = "what mytool does"
authors: str = "Wolfgang Fahl"
doc_url: str = "https://wiki.bitplan.com/index.php/Mytool"
chat_url: str = "https://github.com/WolfgangFahl/mytool/discussions"
cm_url: str = "https://github.com/WolfgangFahl/mytool"
class MytoolCmd(BaseCmd):
"""mytool command line interface."""
def __init__(self):
super().__init__(Version())
def add_arguments(self, parser):
"""Add tool arguments to the given parser."""
super().add_arguments(parser)
parser.add_argument("--input", help="input file")
def handle_args(self, args) -> bool:
"""Handle parsed arguments."""
handled = super().handle_args(args)
if not handled and args.input:
# tool logic here
handled = True
return handled
def main(argv=None) -> int:
"""CLI entry point."""
cmd = MytoolCmd()
exit_code = cmd.run(argv)
return exit_code
Register the entry point in pyproject.toml:
[project.scripts]
mytool = "mytool.mytool_cmd:main"
Live examples: gov-service, ProfiWiki, djvu-viewer, ngwidgets.
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 pybasemkit-0.2.5.tar.gz.
File metadata
- Download URL: pybasemkit-0.2.5.tar.gz
- Upload date:
- Size: 38.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17e0b2b88ffc591d023b69ae5d81d417010fc30977e33f8faee851467591f210
|
|
| MD5 |
36526ad44425b8e8efae000629a73917
|
|
| BLAKE2b-256 |
f7c38495d0afe4df6dbbf989fb251c50ee383db2cdfbe49cbee9fe55ac523706
|
Provenance
The following attestation bundles were made for pybasemkit-0.2.5.tar.gz:
Publisher:
upload-to-pypi.yml on WolfgangFahl/pybasemkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pybasemkit-0.2.5.tar.gz -
Subject digest:
17e0b2b88ffc591d023b69ae5d81d417010fc30977e33f8faee851467591f210 - Sigstore transparency entry: 2325258116
- Sigstore integration time:
-
Permalink:
WolfgangFahl/pybasemkit@e66bd0831b3fd8d53483bdeef6b9ad7f2a83c48d -
Branch / Tag:
refs/tags/v0.2.5 - Owner: https://github.com/WolfgangFahl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
upload-to-pypi.yml@e66bd0831b3fd8d53483bdeef6b9ad7f2a83c48d -
Trigger Event:
release
-
Statement type:
File details
Details for the file pybasemkit-0.2.5-py3-none-any.whl.
File metadata
- Download URL: pybasemkit-0.2.5-py3-none-any.whl
- Upload date:
- Size: 26.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ae73dc8258e06c6174471fe26c570721d2b9ddfca19a78f09e49d8a6a028c13
|
|
| MD5 |
bfee434eac7b183765d87eaa996a1a54
|
|
| BLAKE2b-256 |
35d4ce671da6371f9ae26b59e6d4054f83d6004f4e20710542778f3f85a7ffe1
|
Provenance
The following attestation bundles were made for pybasemkit-0.2.5-py3-none-any.whl:
Publisher:
upload-to-pypi.yml on WolfgangFahl/pybasemkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pybasemkit-0.2.5-py3-none-any.whl -
Subject digest:
3ae73dc8258e06c6174471fe26c570721d2b9ddfca19a78f09e49d8a6a028c13 - Sigstore transparency entry: 2325258587
- Sigstore integration time:
-
Permalink:
WolfgangFahl/pybasemkit@e66bd0831b3fd8d53483bdeef6b9ad7f2a83c48d -
Branch / Tag:
refs/tags/v0.2.5 - Owner: https://github.com/WolfgangFahl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
upload-to-pypi.yml@e66bd0831b3fd8d53483bdeef6b9ad7f2a83c48d -
Trigger Event:
release
-
Statement type: