Python Developer Setup
Instructions for installation of Python-based Commander with the intent on modifying source code
Installation
To develop or test Keeper Commander from source, use a Python virtual environment to isolate dependencies.
Clone the Commander Repository
Clone the GitHub repository to your local machine: https://github.com/Keeper-Security/Commander
The "master" branch will mirror the production release. The "release" branch references the upcoming release. To optionally switch to the release branch:
Install Python
Install the most recent Python3 installation from python.org.
Install Virtualenv
sudo pip3 install virtualenv
Create and Activate Virtual Environment
Install Dependencies and Set Up in Dev Mode
Setup Complete
You can now launch the Commander CLI:
See the Logging in section to understand the authentication process. Explore all of the Commands available.
Sample Python Code
To run bash-formatted CLI commands directly from a python script, you can import the cli
package from the keepercommander
library and run its do_command
function:
In the above example, authentication is handled with the get_params_from_config
function, which is pointing to your config.json
file. See Building a Persistent Login Config for more information on how to build this configuration file.
Alternatively, you can leverage the full scope of the Commander SDK by using its internal classes and functions. Several standalone python scripts can be found here, with examples for searching records, creating teams and sharing folders, and more.
Last updated
Was this helpful?