V-Spark Online Help

Using Python with REST APIs

Python is a popular, open source programming language, and is freely available for operating systems including Linux, Windows, and macOS.

One common problem related to using open source programming languages and public-contributed libraries is a lack of support across different operating system or language versions. For example, if you are running the sample Python application in this document on a CentOS 6.x system and are using that distribution's standard Python installation, you may see deprecation warnings for Python functions that are changing for Python 2.7 and later. To suppress these warnings, you can add the following code to the beginning of the Python file:

import warnings

with warnings.catch_warnings():
    warnings.simplefilter("ignore",category=DeprecationWarning)
    import cryptography    

If you see deprecation warnings for modules other than cryptography, you can add import statements for those to suppress the warnings when loading them.