Learn about the ONTAP Python client library
The NetApp ONTAP Python client library is a package you can install and use to quickly write scripts that access the ONTAP REST API. You'll need to prepare the local runtime environment before using it. You can use the pip utility to install the package from the Python Package Index (PyPI) site.
Features and benefits
You can use the Python client library to quickly develop robust code to automate the administration of your ONTAP deployments. It provides several underlying services, including:
-
Connection management
-
Asynchronous processing
-
Exception handling
-
Uniform error messages
Packages and documentation
The name of the Python client library package is netapp-ontap. The version associated with the package is a combination of the ONTAP major and minor version numbers the library was generated from, along with a minor version for the client library within the ONTAP release. For example, valid version numbers include 9.6.1, 9.6.2, and 9.7.1.
Each ONTAP release beginning with 9.6 has a PyPI package with associated documentation. Installation requirements are included with each package and specify versions of the supporting libraries such as python, requests, requests-toolbelt, and marshmallow.
List of packages and documentation
Code samples
NetApp maintains a GitHub repository with code samples and other helpful information. You can navigate to the examples folder to access samples using the Python client library. Refer to the following locations at GitHub for details: