Examples
Last update: 17.06.2026To help you to create a plugin to your application, two example scripts written in Python are provided. These examples help to demonstrate how to call the Granta Material Picker and return Materials data.
Download the scripts
The Python scripts that are used in the examples can be downloaded: python_examples.zip
Before using the scripts
Before running the scripts, you must decide which environment you would like to develop against and replace the placeholder cloudserver.com with the URL for that environment. The production environment is https://grantamaterials.ansys.com/
Examples
The following examples are available:
- Getting Started - Launches the Granta Material Picker in a browser and obtains data for the material models selected for use in your application.
- Waiting for and retrieving data - Uses an SSE (Server-Sent Event) connection to receive data.