Skip to main content

[!IMPORTANT]
This project is under development. All source code and features on the main branch are for the purpose of testing or evaluation and not production ready.

MFD Base Tool

Module for abstraction of tool (wrappers).

ToolTemplate has got 3 main methods:

  • _get_tool_exec_factory(self) -> str - responsible to return correct tool execute name according to e.g. OS. Should use tool_executable_name structure as store for names.
  • check_if_available(self) -> None - responsible for checking, if tool is available and executable in system. Should raise exception if not
  • get_version(self) -> str - responsible for getting version of tool.

All methods and tool_executable_name variable in class must be implemented in developed tool. Arguments in public methods must be forced as named arguments: __init__(self, *, arg1, arg2) etc.

Usage

Example implementation using ToolTemplate:

from mfd_base_tool import ToolTemplate


class MyTool(ToolTemplate):
    tool_executable_name = "my tool name"
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

    def _get_tool_exec_factory(self) -> str:
        return self.tool_executable_name

    def check_if_available(self) -> None:
        if not "if statement for check":
            raise MyToolNotAvailable()

    def get_version(self) -> str:
        return "my read tool version"
    
    def my_tool_method(self):
        pass

OS supported:

  • LNX
  • WINDOWS
  • ESXI
  • FREEBSD
  • EFI shell support

Issue reporting

If you encounter any bugs or have suggestions for improvements, you're welcome to contribute directly or open an issue here.

Metadata

Release files for mfd-base-tool 2.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for mfd-base-tool 2.7.0
File Interpreter ABI Platform
mfd_base_tool-2.7.0-py3-none-any.whl Python 3 none any Details

Release files / mfd_base_tool-2.7.0-py3-none-any.whl

Download URL mfd_base_tool-2.7.0-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8694d2cbaeae2c015da51ff2f5df64736e8a5e9db313149ba3702f962acdf80
BLAKE2b-256 checksum
How to use checksums
d469b0a397c332a6e77d437a0fb16f5794c9c0fe2b21dae711f1c6029a4dc759
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

2.7.0 This release

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page