Document toolboxDocument toolbox

Vidispine

Install and use Python SDK with Vidispine API

Applies to 

Python-based environments and requirements to integrate with Vidispine API.

 


Summary

With our new Python SDK you will direct access to the correct arguments and datatypes for the Vidispine API which of course makes it much easier to get started building your media supply chain with Vidispine API.

System requirements and pre-requisites

  • Vidispine 5.x verified, accessible and running

  • understanding of the Vidispine API configuration and infrastructure

  • a python 3.4+ environment

  • how to use the PIP installer

  • or how to install from our GitHub repository including a GitHub account

 



 

Installation

 

The Python environment installs on Windows, OSX, and Linux. As mentioned earlier Vidispine recommends users to install Python 3 for future compliance.  

Please use below common install using shell.

Pip install Vidispine 

Or install directly from the source at the Vidispine GitHub Repository https://github.com/vidispine/vidispine-python-sdk

Usage example

 

After successfully installed Python you are ready to test your first script. In this example, we retrieve the server information using a python call to Vidispine API

 Use your favourite Python Editing environment and follow along

 

 ### Getting vidispine server version information ```python from __future__ import print_function import vidispine from vidispine.rest import ApiException from pprint import pprint   configuration = vidispine.Configuration() # Configure HTTP basic auth configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD'   # Create an instance of the API class system_api = vidispine.SystemApi(vidispine.ApiClient(configuration))     try:     # Get version info     api_response = system_api.get_version()     pprint(api_response) except ApiException as e:     print("Exception when getting version info: %s\n" % e)

```

 

As of January 1, 2020 the core development team of the Python Software foundation will no longer support, update or provide new versions of Python. So, of possible – use Python 3.  

Related articles