Skip to main content

Module that contains abstraction of tool in Modular Framework Design (MFD).

Project description

[!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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mfd_base_tool-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file mfd_base_tool-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mfd_base_tool-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mfd_base_tool-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 969d262e644bf3b9f12b4dfcebfff8374996d5e952ced50eb3f4ca4e56719c83
MD5 19089b3dd3c3b75f0ec89a993a8c5736
BLAKE2b-256 9954104a78bab02ececb0e991e88e193da9262d838efabf9193f63ebe28ef44f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page