# 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/71/c1/5c3081a3852f75756f6a92db99880a59bee5b9e70fa735711e20bde8d114/pybenparallels-1.1.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.1.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": "c544a734a74672b30f1f265893e6d9b358fa57e9c5065241a9ea536c501e1f8d",
"md5": "9aa40e08fb7e2c6734c06e3bc4145eda",
"sha256": "64f10d7f8e6a26223c7c1271e7b97b19bb613a257cf07d1eb70aec7976a8db53"
},
"downloads": -1,
"filename": "pybenparallels-1.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9aa40e08fb7e2c6734c06e3bc4145eda",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 6944,
"upload_time": "2025-07-28T12:16:20",
"upload_time_iso_8601": "2025-07-28T12:16:20.813910Z",
"url": "https://files.pythonhosted.org/packages/c5/44/a734a74672b30f1f265893e6d9b358fa57e9c5065241a9ea536c501e1f8d/pybenparallels-1.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "71c15c3081a3852f75756f6a92db99880a59bee5b9e70fa735711e20bde8d114",
"md5": "607084858e43e7418082f07b8d431bcb",
"sha256": "1582a56c8f382be80e2c98fd699bf15113d3fb8979a71c62b3701d964e483a7e"
},
"downloads": -1,
"filename": "pybenparallels-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "607084858e43e7418082f07b8d431bcb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 6349,
"upload_time": "2025-07-28T12:16:22",
"upload_time_iso_8601": "2025-07-28T12:16:22.014879Z",
"url": "https://files.pythonhosted.org/packages/71/c1/5c3081a3852f75756f6a92db99880a59bee5b9e70fa735711e20bde8d114/pybenparallels-1.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-28 12:16:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "DarkFlameBEN",
"github_project": "pybenparallels",
"github_not_found": true,
"lcname": "pybenparallels"
}