# PyBenParallels

[](https://pypi.org/project/pybenparallels/)

-3.10+-red.svg)

## Introduction
PyBEN Parallels repository is an easy to use python utility class for Parallels server solution
## Installation
> python -m pip install pybenparallels
## Use
### Cli module activation
Run for a full help printout:
```bash
python -m pybenparallels -h
```
The class can be run on remote location via SSH or Locally by leaving the PARALLELS_HOST empty
- pybenparallels is the name of the module
- pprint is a function to print the returned dict nicely in console
- get_vms is a function to return all vms (or request a specific one)
Example use for LOCAL to get all vms and a specific one:
```bash
python -m pybenparallels pprint get_vms
python -m pybenparallels pprint get_vms vm_name=ventura
```
Example for REMOTE SERVER use of global variables to get all vms:
Use PARALLELS_CLI_EXEC when you need to override the execution line to overcome ssh context restrictions.
```bash
set PARALLELS_HOST='1.1.1.1'
set PARALLELS_HOST_USER='root'
set PARALLELS_HOST_PASS='1234'
set PARALLELS_CLI_EXEC='. ~/.zprofile; prlctl'
python -m pybenparallels pprint get_vms
```
Example for passing variables directly for REMOTE SERVER:
- pybenparallels is the name of the module
- get_vms is a function to return all vms (or request a specific one)
```bash
python -m pybenparallels host=1.1.1.1 host_user=root host_password=1234 get_vms vm_name=ventura
```
### Python import ProxmoxCls class
```python
from pybenparallels import ParallelsCLI
# For remote server (connection via ssh)
server = ParallelsCLI(host='1.1.1.1', host_user='root', host_password='1234')
server.cli_exec = '. ~/.zprofile; prlctl' # Sometimes the ssh user does not have the correct python3 in PATH
print(server.get_vms())
# For local use, when you are running on the parallel server
print(ParallelsCLI().get_vms())
```
Some of the included functions:
- get_vms: Returns a full list of vms, or list with matching vms by uuid or name
- run_command: Execute a command on the parallels cli
- send_vm_command: prlctl exec ...
- send_vm_command_by_ssh
- create_vms
- delete_vm
- start_vm
- stop_vm
- pause_vm
- resume_vm
- snapshot handling
- and more ...
Raw data
{
"_id": null,
"home_page": null,
"name": "pybenparallels",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Ben Moskovitch <darkflameben@gmail.com>",
"keywords": "python, parallels, utils, utilities, automation, automation-tools",
"author": "Ben Moskovitch",
"author_email": "Ben Moskovitch <darkflameben@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/61/47/abe708ae5b5f86bf44f4693b1e02be726b3768841b7ea251e84df1f8a0f1/pybenparallels-1.0.1.tar.gz",
"platform": null,
"description": "# PyBenParallels\r\n\r\n\r\n[](https://pypi.org/project/pybenparallels/)\r\n\r\n-3.10+-red.svg)\r\n\r\n\r\n## Introduction\r\nPyBEN Parallels repository is an easy to use python utility class for Parallels server solution\r\n\r\n## Installation\r\n> python -m pip install pybenparallels\r\n\r\n## Use\r\n\r\n### Cli module activation\r\n\r\nRun for a full help printout:\r\n```bash\r\npython -m pybenparallels -h\r\n```\r\n\r\nThe class can be run on remote location via SSH or Locally by leaving the PARALLELS_HOST empty\r\n\r\n - pybenparallels is the name of the module\r\n - pprint is a function to print the returned dict nicely in console\r\n - get_vms is a function to return all vms (or request a specific one)\r\n\r\nExample use for LOCAL to get all vms and a specific one:\r\n```bash\r\npython -m pybenparallels pprint get_vms \r\npython -m pybenparallels pprint get_vms vm_name=ventura\r\n```\r\n\r\nExample for REMOTE SERVER use of global variables to get all vms:\r\nUse PARALLELS_CLI_EXEC when you need to override the execution line to overcome ssh context restrictions.\r\n```bash\r\nset PARALLELS_HOST='1.1.1.1'\r\nset PARALLELS_HOST_USER='root'\r\nset PARALLELS_HOST_PASS='1234'\r\nset PARALLELS_CLI_EXEC='. ~/.zprofile; prlctl'\r\n\r\npython -m pybenparallels pprint get_vms\r\n```\r\nExample for passing variables directly for REMOTE SERVER:\r\n - pybenparallels is the name of the module\r\n - get_vms is a function to return all vms (or request a specific one)\r\n```bash\r\npython -m pybenparallels host=1.1.1.1 host_user=root host_password=1234 get_vms vm_name=ventura\r\n```\r\n\r\n### Python import ProxmoxCls class\r\n```python\r\nfrom pybenparallels import ParallelsCLI\r\n\r\n# For remote server (connection via ssh)\r\nserver = ParallelsCLI(host='1.1.1.1', host_user='root', host_password='1234')\r\nserver.cli_exec = '. ~/.zprofile; prlctl' # Sometimes the ssh user does not have the correct python3 in PATH\r\nprint(server.get_vms())\r\n\r\n# For local use, when you are running on the parallel server\r\nprint(ParallelsCLI().get_vms())\r\n```\r\nSome of the included functions:\r\n - get_vms: Returns a full list of vms, or list with matching vms by uuid or name\r\n - run_command: Execute a command on the parallels cli\r\n - send_vm_command: prlctl exec ...\r\n - send_vm_command_by_ssh\r\n - create_vms\r\n - delete_vm\r\n - start_vm\r\n - stop_vm\r\n - pause_vm\r\n - resume_vm\r\n - snapshot handling\r\n - and more ...\r\n",
"bugtrack_url": null,
"license": null,
"summary": "PyBEN Parallels repository is an easy to use python utility class for Parallels server solution",
"version": "1.0.1",
"project_urls": {
"Homepage": "https://github.com/DarkFlameBEN/pybenparallels.git"
},
"split_keywords": [
"python",
" parallels",
" utils",
" utilities",
" automation",
" automation-tools"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "41c20143f6ac64ad8e005a8518341c6fd4c7c0be51268f680bb06cc21dce631e",
"md5": "c01f11ce5781f72389b8bd5072032bf3",
"sha256": "404e73d8aed1546df63283fca986883b0dd244a09c7b8c28a0462058a42129b1"
},
"downloads": -1,
"filename": "pybenparallels-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c01f11ce5781f72389b8bd5072032bf3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 6824,
"upload_time": "2025-07-23T14:46:17",
"upload_time_iso_8601": "2025-07-23T14:46:17.538730Z",
"url": "https://files.pythonhosted.org/packages/41/c2/0143f6ac64ad8e005a8518341c6fd4c7c0be51268f680bb06cc21dce631e/pybenparallels-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "6147abe708ae5b5f86bf44f4693b1e02be726b3768841b7ea251e84df1f8a0f1",
"md5": "d3909896f463b9d879e3b44e4593c587",
"sha256": "2f4211d04e08958c8f01e87cac1284425b201fb4f43705e36e4e72c191750370"
},
"downloads": -1,
"filename": "pybenparallels-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "d3909896f463b9d879e3b44e4593c587",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 6206,
"upload_time": "2025-07-23T14:46:18",
"upload_time_iso_8601": "2025-07-23T14:46:18.741298Z",
"url": "https://files.pythonhosted.org/packages/61/47/abe708ae5b5f86bf44f4693b1e02be726b3768841b7ea251e84df1f8a0f1/pybenparallels-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-23 14:46:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "DarkFlameBEN",
"github_project": "pybenparallels",
"github_not_found": true,
"lcname": "pybenparallels"
}