confluentinc / confluentinc/cli-plugins
How to install python plugins?
- Dominant language
- Python
- Stars
- 3
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
One of the plugins is created using Go and I've got it installed, but I can't figure out how to get the Python based plugins installed. I've used Python before and know how to use pip, but I can't seem to figure out how to install this. Using e.g. **confluent plugin install confluent-api_key-purge** doesn't work, because it's unable to find the python file for the plugin. Even when you download the python file locally and point confluent to it **confluent plugin install .\confluent-api_key-purge.py**, it doesn't work.
I'm using Python 3.9.
UPDATE:
OK, after running **confluent plugin -h**, it looks like the confluent CLI expects the plugins to be an executable. The Python plugins are just .py files. I ended up using ChatGPT to help me convert/compile the .py into a .exe, by doing this:
Step 1: Install PyInstaller
First, you need to install pyinstaller. Open a terminal (command prompt) and use pip to install it:
pip install pyinstaller
Step 2: Navigate to your script's directory
Using the terminal (command prompt), change the directory to the location where your Python script is located. For example:
cd path/to/your/script/directory
Step 3: Create the .exe file
Run the pyinstaller command to create the .exe file. Replace your_script.py with the actual filename of your Python script:
pyinstaller --onefile your_script.py
The --onefile option bundles everything into a single .exe file. If you don't use this option, pyinstaller will create a build with multiple files, which might include a bunch of supporting files and a folder containing the executable.
Contributor guide
Assessment
This issue has not been assessed yet.