Skip to main content

Toolbox

https://img.shields.io/pypi/v/tool-box.svg https://img.shields.io/travis/jeff-99/toolbox.svg Documentation Status

What is Toolbox ?

Toolbox is a framework to manage a collection of tools. A tool can be anything from a shell script to a python package.

Basically toolbox extends the python argparse.ArgumentParser to enable importing tools from multiple locations in a single executable. Toolbox provides some easy default tools to create , install, uninstall or list (available) tools.

A custom tool needs to implement 2 methods: * prepare_parser : which prepares an argparse.ArgumentParser * execute : which is the main entry point of your tool

Besides the wrapper around argument parsing toolbox as a framework provides some easy to add extra’s like persisted configuration, usage of tools within tools and no-configuration logging.

An example of a custom tool:

from toolbox.plugin import ToolboxPlugin
from toolbox.mixins import RegistryMixin, ConfigMixin, LogMixin

class CustomPlugin(RegistryMixin, ConfigMixin, LogMixin, ToolboxPlugin)
        name = "custom"
        description = "This is a custom plugin that prints a string"

        def prepare_parser(self,parser):
                parser.add_argument('printable', help="string to print")

        def execute(args):
                # LogMixin
                logger = self.get_logger()
                logger.info("printing {}".format(args.printable)

                # ConfigMixin
                config = self.get_config()
                config['first_print'] = args.printable

                # RegistryMixin
                registry = self.get_registry()
                other_plugin = registry.get_plugin('other')

                print(args.printable)

For more info on all the tools the toolbox framework provides check the complete documentation!

Features

  • Integrate your own shell scripts etc. with a single command

  • Easily integrate your existing python tools with toolbox by wrapping them in ToolboxPlugin class

  • Add persisted configuration to your tools

  • Use other tools within your own tools

  • search tools in the toolbox

  • install other tools from PyPI/github with the toolbox commandline

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.5.0 (2016-01-02)

  • added logs tool

  • added tests for the registry , scanner and config

0.4.0 (2016-01-01)

  • First stable release on PyPI.

Release files for tool-box 0.5.1

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

Source distribution (sdist)

Source distribution for tool-box 0.5.1
File Size Uploaded
tool-box-0.5.1.tar.gz 26.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tool-box 0.5.1
File Interpreter ABI Platform
tool_box-0.5.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 51.8 kB

Release files / tool-box-0.5.1.tar.gz

Download URL tool-box-0.5.1.tar.gz
Size 26.4 kB
Tags Source
SHA-256 checksum
How to use checksums
843929441c2d3d8fc147b44851702437e311e9133e9998614d7757886cd154d1
BLAKE2b-256 checksum
How to use checksums
ef9a7b28885d5e4c2139f3449ddfa34861bf769a9f7ac56bf48092f23804c626
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / tool_box-0.5.1-py2.py3-none-any.whl

Download URL tool_box-0.5.1-py2.py3-none-any.whl
Size 25.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
6ecaeac799c8e42fa436735647d62b60badd032743b6c9eb3f13f754a7a06634
BLAKE2b-256 checksum
How to use checksums
3a946e52769b2b83afad68ccdae70a3394ba6ac59a28d3211ddc1af7824b9232
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

1 release file

0.3.1

2 release files

0.3.0

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