Python SDK library for interacting with ZeroStack Cloud Operating System API
The ZeroStack ZSPython SDK is a library that will help developers and datacenter engineers integrate with, and automate the ZeroStack cloud platform. The ZSPython SDK seamlessly integrate with the ZeroStack Cloud Platform using the Python language. The ZSPython library is imported like any other Python library and reduces the time to value of the ZeroStack cloud platform.
Component | Version |
---|---|
ZCOS Star | 3.0 - 3.0.x |
:-------------- | :-------------- |
ZCOS Sky. | 26.x - 27.x |
If you have any questions or comments about this product, open an issue on our GitHub repo or reach out to the online developer community at ThePub. Your feedback helps us focus our efforts on new features and capabilities.
From PyPI
pip install zspython-sdk
From Source
Note: It is recommended using virtualenv for isolating the python environment to only the required libraries.
Alternatively, for development purposes or to inspect the source, the following will work:
git clone git@github.com:zerostack-open/zs-python.git
cd zspython
git checkout develop
pip install -e ".[dev, test, docs, release]"
python setup.py install
Then append the location of this directory to the PYTHONPATH
environment variable to use the SDK in other python scripts:
export PYTHONPATH=$PYTHONPATH:/path/to/zs-python-sdk/
That's it -- you are ready to start interacting with your ZeroStack cluster using Python!
Getting Started
This video is a walkthrough of getting started with the ZeroStack Python SDK. You will see how install the SDK, connect to a ZeroStack cluster, and use it to perform simple operations like retrieving and modifying accounts and volumes.
To configure logging responses, execute the following:
import logging
Connection timeout (useful for failing fast when a host becomes unreachable):