Skip to main content

CX-tool

This is a collection of utility functions that I have written over the years. I have decided to put them all in one place so that I can easily access them. I have also included a few utility functions that I have found useful from other sources.

Installation

pip install --user cx-tool

Usage

cx-tool install

Write your own plugin

You can add your own plugin that performs a specific task. To do this, you need to create a new Python file in the plugins directory. The file should contain a class that inherits from the Plugin class.

To add click command use the

import click

from cx_tool.plugin import Plugin, clickable, PluginContext

class MyPlugin(Plugin):
    name = "my-plugin"

    @clickable
    def hello(self):
        click.echo("Hello, World!")
    
    def on_load(self):
        """This method is called when the plugin is loaded.
            
        Here you can add any initialization code that you need.
        """

        self.cli_command("hello")(self.hello)

    def on_start(self, ctx: PluginContext):
        """This method is called when the CrossOver app is started.

        Here you can add env variables and arguments to CrossOver app.
        """

        ctx.environment["HELLO"] = "WORLD"

To access hello click subcommand command use the following command

cx-tool my-plugin hello

Download files

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

Source Distribution

cx_tool-0.1.0.39.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

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

cx_tool-0.1.0.39-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

Details for the file cx_tool-0.1.0.39.tar.gz.

File metadata

  • Download URL: cx_tool-0.1.0.39.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.1 Darwin/24.0.0

File hashes

Hashes for cx_tool-0.1.0.39.tar.gz
Algorithm Hash digest
SHA256 4fd7b4904c18eb5a9a614774a5ae8e3307e4e4ed58617527bced9e14a646c5f9
MD5 5f8d41fb3ce6a0752b3f02e536cdc68f
BLAKE2b-256 54b575ef8a18a184f49ebf3d601fccbfc84fd581e9dafcdb191d24832e03e8d2

See more details on using hashes here.

File details

Details for the file cx_tool-0.1.0.39-py3-none-any.whl.

File metadata

  • Download URL: cx_tool-0.1.0.39-py3-none-any.whl
  • Upload date:
  • Size: 25.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.1 Darwin/24.0.0

File hashes

Hashes for cx_tool-0.1.0.39-py3-none-any.whl
Algorithm Hash digest
SHA256 bd9ab61f1d352684f9538272cdd5864c5c0e64134241d9a9be85cfafec86dc30
MD5 56d1ca108c93c2cb6142bc52fece32df
BLAKE2b-256 4b1115c257babd3cab16481fc9d224bf1de4c2719725bd31d39896cbe0e50e90

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0.39 This release

2 files

0.1.0.38

2 files

0.1.0.37

2 files

0.1.0.36

2 files

0.1.0.35

2 files

0.1.0.33

2 files

0.1.0.32

2 files

0.1.0.31

2 files

0.1.0.30

2 files

0.1.0.29

2 files

0.1.0.28

2 files

0.1.0.27

2 files

0.1.0.26

2 files

0.1.0.25

2 files

Supported by

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