{"id":27528,"library":"vmware-vapi-runtime","title":"VMware vAPI Runtime","description":"VMware vAPI Runtime library provides the core infrastructure for consuming VMware vSphere Automation and Cloud Foundation APIs. Current version 2.61.2. Release cadence is tied to VMware SDK releases, approximately quarterly.","status":"active","version":"9.0.0.0","language":"python","source_language":"en","source_url":"https://github.com/vmware/vcf-sdk-python","tags":["vmware","vapi","vsphere","sdk","cloud-foundation"],"install":[{"cmd":"pip install vmware-vapi-runtime","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"SOAP client dependency","package":"suds","optional":false},{"reason":"Common client classes","package":"vmware-vapi-common-client","optional":false}],"imports":[{"note":"Correct path includes vsphere namespace","wrong":"from vapi.client import VapiClient","symbol":"VapiClient","correct":"from vmware.vapi.vsphere.client import VapiClient"},{"note":"Old package structure changed","wrong":"from vapi.core import StubConfiguration","symbol":"StubConfiguration","correct":"from vmware.vapi.core import StubConfiguration"},{"note":"Namespace was flattened","wrong":"from vapi.security import SecurityContext","symbol":"SecurityContext","correct":"from vmware.vapi.security import SecurityContext"}],"quickstart":{"code":"import os\nfrom vmware.vapi.vsphere.client import create_vsphere_client\nfrom vmware.vapi.security.user_password import create_user_password_security_context\n\n# Authentication\nusername = os.environ.get('VSPHERE_USER', 'administrator@vsphere.local')\npassword = os.environ.get('VSPHERE_PASSWORD', '')\nserver = os.environ.get('VSPHERE_SERVER', 'vcenter.example.com')\n\nsecurity_context = create_user_password_security_context(username, password)\nclient = create_vsphere_client(server=server, username=username, password=password)\n# List VMs\nvm_list = client.vcenter.VM.list()\nprint(vm_list)","lang":"python","description":"Initialize vSphere client, authenticate, and list VMs using vAPI runtime."},"warnings":[{"fix":"Replace 'from vapi...' with 'from vmware.vapi...'","message":"In version 9.0.0.0, the package namespace changed from `vapi` to `vmware.vapi`. All imports must be updated.","severity":"breaking","affected_versions":">=9.0.0.0"},{"fix":"Use `from vmware.vapi.vsphere.client import create_vsphere_client`","message":"The `create_vsphere_client` helper function was added in 9.0.0.0, replacing manual StubConfiguration setup.","severity":"breaking","affected_versions":">=9.0.0.0"},{"fix":"Migrate to REST API calls using requests library.","message":"SOAP-based API calls via `suds` are deprecated and will be removed in future releases.","severity":"deprecated","affected_versions":">=9.0.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Update imports to 'from vmware.vapi...'","cause":"Package namespace changed from 'vapi' to 'vmware.vapi' in version 9.0.0.0.","error":"ImportError: No module named vapi"},{"fix":"Upgrade to vmware-vapi-runtime >=9.0.0.0 or use older import pattern: from vmware.vapi.core import StubConfiguration","cause":"The helper module was introduced in 9.0.0.0; older versions require manual client construction.","error":"ModuleNotFoundError: No module named 'vmware.vapi.vsphere.client'"},{"fix":"Ensure correct security context is attached: e.g., create_user_password_security_context(username, password)","cause":"Authentication context not properly set or credentials missing.","error":"suds.WebFault: Server raised fault: 'The request requires user authentication.'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}