Skip to main content

CrossOver-Util

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 crossover_util.plugin.plugin import Plugin, clickable
from crossover_util.plugin.context import 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

crossover_util-0.1.0.25.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

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

crossover_util-0.1.0.25-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file crossover_util-0.1.0.25.tar.gz.

File metadata

  • Download URL: crossover_util-0.1.0.25.tar.gz
  • Upload date:
  • Size: 13.1 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 crossover_util-0.1.0.25.tar.gz
Algorithm Hash digest
SHA256 59dcbc17fce8ba68c3a82990b9e71b9dd9f63770f127fdfc4ef8b22ea2be8444
MD5 38bc3b8ba9cefa227791db5de195d2b7
BLAKE2b-256 105b5e4c1ec1b30b745814e7e4238e002ee2260d2b9ff6d2176441c1f97fdc51

See more details on using hashes here.

File details

Details for the file crossover_util-0.1.0.25-py3-none-any.whl.

File metadata

  • Download URL: crossover_util-0.1.0.25-py3-none-any.whl
  • Upload date:
  • Size: 18.4 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 crossover_util-0.1.0.25-py3-none-any.whl
Algorithm Hash digest
SHA256 c5d100aca2b98b3a4f1274687bb0305394b3abb46d3409f66ff7074925974227
MD5 d20b17488aec7e8e2d4dc3e320cad1d7
BLAKE2b-256 25684a4b31f7440770d616036486c724e1d878f43263177fdea5dabf2145112e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0.25 This release

2 files

0.1.0.24

2 files

0.1.0.23

2 files

0.1.0.22

2 files

0.1.0.21

2 files

0.1.0.20

2 files

0.1.0.19

2 files

0.1.0.18

2 files

0.1.0.17

2 files

0.1.0.16

2 files

0.1.0.15

2 files

0.1.0.14

2 files

0.1.0.13

2 files

0.1.0.12

2 files

0.1.0.11

2 files

0.1.0.10

2 files

0.1.0.9

2 files

0.1.0.8

2 files

0.1.0.7

2 files

0.1.0.6

2 files

0.1.0.5

2 files

0.1.0.4

2 files

0.1.0.3

2 files

0.1.0.2

2 files

0.1.0.1

2 files

0.1.0

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