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.
Metadata
Release files for pybasemkit 0.2.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pybasemkit-0.2.6.tar.gz | 38.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pybasemkit-0.2.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 64.9 kB
Release files / pybasemkit-0.2.6.tar.gz
| Download URL | pybasemkit-0.2.6.tar.gz |
|---|---|
| Size | 38.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b13ea68341905fd942dd8a2c78bbf5e4b1d8bd3655c00ffee35ec6ac269fa3e2
|
|
BLAKE2b-256 checksum How to use checksums |
c8c7343853b2fff45259723cf75f82cc9c8a9a5e59e671ea7295dc70740d69ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.
Transparency logRelease files / pybasemkit-0.2.6-py3-none-any.whl
| Download URL | pybasemkit-0.2.6-py3-none-any.whl |
|---|---|
| Size | 26.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26e88992a5836baa6dedaed424c2ba559340722347d9a9f38977e915b36cf07e
|
|
BLAKE2b-256 checksum How to use checksums |
fefb3be4058d4fa38e750f2815820a5163c177ba0edb73ba5199ba0e914605bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.
Transparency log