Skip to main content

vSphere SDK for Python

Project description

Sunset Notice

We strongly recommend that you start your VMware Python journey with the official VMware pyvmomi library.

psphere was created when no other client was available. It was a privilege to create something that was useful to others.

“Death is only the end if you assume the story is about you.” ― The Nightvale Podcast

Introduction

psphere is a Python interface for the VMware vSphere Web Services SDK, a powerful API for programatically managing your VMware infrastructure:

  • Provision, clone and snapshot virtual machines

  • Query and configure clusters, host systems and datastores

  • Programatically configure ESXi hosts (i.e. for automation)

psphere can be used to create standalone Python scripts or used as a library in larger Python applications (e.g. Django).

Usage

>>> from psphere.client import Client
>>> client = Client("your.esxserver.com", "Administrator", "strongpass")
>>> servertime = client.si.CurrentTime()
>>> print(servertime)
2010-09-04 18:35:12.062575
>>> client.logout()

Installation

The latest stable version of psphere can be installed from PyPi:

# pip install -U psphere

Community

Discussion and support can be found on the psphere Google Group.

Releasing

To perform a release, you will need to be an admin for the project on GitHub and on PyPI. Contact the maintainers if you need that access.

You will need to have a ~/.pypirc with your PyPI credentials and also the following settings:

[zest.releaser]
create-wheels = yes

To perform a release, run the following:

python3.7 -m venv ~/.virtualenvs/dist
workon dist
pip install -U pip setuptools wheel
pip install -U tox zest.releaser
fullrelease  # follow prompts, use semver ish with versions.

The releaser will handle updating version data on the package and in CHANGES.rst along with tagging the repo and uploading to PyPI.

0.6.0 (2020-05-12)

  • Upgrade setup.py to setup.cfg

0.6.0a1 (2019-03-26)

  • use maintained suds-community

0.6.0a (2019-02-18)

  • support HTTPS by passing an ssl.SSLContext

  • use more secure suds-jurko

  • use except Exception as e syntax

  • switch to zest.releaser

Version 0.5.2

(bugfix release, released on April 5th 2013)

  • Add an example showing how to list VMs on a host

  • Add a new example of powering on many VMs at once

  • Fix regression that calls _init_logging() and remove the function for good.

  • Update references from bitbucket to github

  • Merge bitbucket pull request: Pierre-Yves D Fixed error when setting extraOptions on VM creation

  • Merge bitbucket pull request: Saju M 3cbdf636d068 Adding example get_filesize_by_path

  • MANIFEST.in: s/README/README.rst

  • Updated managed objects to include new objects in sphere 5.0

  • When pre-loading objects, don’t try and pre-load them when the requested attributed contains an empty list. fixes #7

  • Replace print calls with logging calls. fixes issue 8

  • Remove use of sys.exit and raise exceptions instead. fixes issue 8

  • Use *args to pass log strings (efficiency, as log mesages won’t be string formatted unless they’re actually logged). Remove _init_logging to mak

  • Convert Windows path to WSDL file to URI format

  • Documentation updates

Version 0.5.1

(bugfix release, released on August 19th 2011)

Version 0.5.0

(major release, released on August 11th 2011)

  • The API has completely changed, programs written for 0.1.4 will not work in 0.5.0 or later versions.

  • Implements vSphere SDK 4.1

  • All vSphere Managed Object’s are implemented including all properties.

  • Object properties are now lazily loaded on first access and cached for 5 minutes.

Version 0.1.4

Released on July 15th 2011

  • Primitive release of psphere for Aeolus Project to package into Fedora.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

psphere-0.6.0.tar.gz (145.8 kB view details)

Uploaded Source

Built Distribution

psphere-0.6.0-py2.py3-none-any.whl (152.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file psphere-0.6.0.tar.gz.

File metadata

  • Download URL: psphere-0.6.0.tar.gz
  • Upload date:
  • Size: 145.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.7

File hashes

Hashes for psphere-0.6.0.tar.gz
Algorithm Hash digest
SHA256 19da7d908dc7f6f357b34effaa9d20988e07710dddc72ee7b017d594126204d4
MD5 ef3d22e062a22d24c3934bbb794b08a5
BLAKE2b-256 c67579bf0a0d52c5dbe760a6ed60a84680bec80a93f754756e0821f44b504f95

See more details on using hashes here.

File details

Details for the file psphere-0.6.0-py2.py3-none-any.whl.

File metadata

  • Download URL: psphere-0.6.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 152.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.7

File hashes

Hashes for psphere-0.6.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2514ed21fde9e30914e28019e044c8b2d87f4cbb1f8501ba9edab9a952163100
MD5 9569885612e1a2f06e473941ab5d688f
BLAKE2b-256 63d6317e8cfaa5c3fd987bbb33dc0fcb90bbb0b121fc114c5a2f9962be353e75

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page