Metadata-Version: 2.4
Name: vmware-vcenter
Version: 9.1.0.0
Summary: Client library for vmware-vcenter APIs
Author: Broadcom
License: License :: OSI Approved :: MIT License
Project-URL: Homepage, https://github.com/vmware/vcf-sdk-python
Keywords: Broadcom,VMware,VCF,SDK,vSphere,vCenter
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Developers
Classifier: Environment :: No Input/Output (Daemon)
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Distributed Computing
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: vmware-vapi-common-client==9.1.0.0
Requires-Dist: vmware-vapi-runtime==9.1.0.0
Dynamic: license-file

# VMware vCenter Server

The vCenter module of the VMware Cloud Foundation SDK provides methods related to content libraries and resource
deployment, tagging, and managing internal and external security certificates.

[Package (PyPI)](https://pypi.org/project/vmware-vcenter/) | [REST API documentation](https://developer.broadcom.com/xapis/vsphere-automation-api/latest/)

## Getting started

### Prerequisites

- Supported Python versions: 3.10, 3.11, 3.12, 3.13 and 3.14

### Install the package

```bash
pip install vmware-vcenter
```

### Connect to a vCenter Server

```python
import requests
import urllib3
from vmware.vapi.vsphere.client import create_vsphere_client
session = requests.session()

# Disable cert verification for demo purpose.
# This is not recommended in a production environment.
session.verify = False

# Disable the secure connection warning for demo purpose.
# This is not recommended in a production environment.
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

# Connect to a vCenter Server using username and password
vsphere_client = create_vsphere_client(server='<vc_ip>', username='<vc_username>', password='<vc_password>', session=session)

# List all VMs inside the vCenter Server
vsphere_client.vcenter.VM.list()
```

Output in a Python Interpreter:

```shell
>>> import requests
>>> import urllib3
>>> from vmware.vapi.vsphere.client import create_vsphere_client
>>> session = requests.session()
>>> session.verify = False
>>> urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
>>> vsphere_client = create_vsphere_client(server='<vc_ip>', username='<vc_username>', password='<vc_password>', session=session)
>>> vsphere_client.vcenter.VM.list()
[Summary(vm='vm-58', name='standalone-20e4bd3af-esx.0-vm.0', power_state=State(string='POWERED_OFF'), cpu_count=1, memory_size_mib=256),
...]
```

**NOTE:** If you are using Bash, be sure to use single quote for username and password to preserve the values. If you use double quote, you will have to escape special characters, such as "$". See [Bash manual](http://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html)
