Crossover utility tool
Project description
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 crossover-util
Usage
crossover-util 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
crossover-util plugin my-plugin hello
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file crossover_util-0.1.0.12.tar.gz
.
File metadata
- Download URL: crossover_util-0.1.0.12.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.1 Darwin/24.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca0ec03b13faf9982ce445e6eaf578dda9e74fc0cffb1c8c47b19ed311b051fa |
|
MD5 | 2011b95805b9e9de9ac2306ebec76e09 |
|
BLAKE2b-256 | f9166f472bd39fcfa39c2470be2394a66bdeabf223e3a89faf25b83c1fd2c1a6 |
File details
Details for the file crossover_util-0.1.0.12-py3-none-any.whl
.
File metadata
- Download URL: crossover_util-0.1.0.12-py3-none-any.whl
- Upload date:
- Size: 10.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24a92a71bf6f461ad7a15edb71018a0cd229ad71e95b4f1f781ef2286b2ed181 |
|
MD5 | fdadcfac924d6fcbfa4a1a248b5ce00c |
|
BLAKE2b-256 | 1502a342c140bd73144b277c24bdc83ee3a1696db319b289f7ee354bfaf633a8 |