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
Metadata
Release files for crossover-util 0.1.0.25
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| crossover_util-0.1.0.25.tar.gz | 13.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| crossover_util-0.1.0.25-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.5 kB
Release files / crossover_util-0.1.0.25.tar.gz
| Download URL | crossover_util-0.1.0.25.tar.gz |
|---|---|
| Size | 13.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59dcbc17fce8ba68c3a82990b9e71b9dd9f63770f127fdfc4ef8b22ea2be8444
|
|
BLAKE2b-256 checksum How to use checksums |
105b5e4c1ec1b30b745814e7e4238e002ee2260d2b9ff6d2176441c1f97fdc51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.11.1 Darwin/24.0.0
|
Release files / crossover_util-0.1.0.25-py3-none-any.whl
| Download URL | crossover_util-0.1.0.25-py3-none-any.whl |
|---|---|
| Size | 18.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c5d100aca2b98b3a4f1274687bb0305394b3abb46d3409f66ff7074925974227
|
|
BLAKE2b-256 checksum How to use checksums |
25684a4b31f7440770d616036486c724e1d878f43263177fdea5dabf2145112e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.11.1 Darwin/24.0.0
|