    

 ## On this page

  

 

 # Example notebooks

 Last update: 16.07.2025 

The MI Scripting Toolkit documentation includes example notebooks that cover key features of the Python interface. These are available as HTML reference documents, Jupyter Notebook files, and python scripts below:

- [Streamlined API Example Notebooks](stream_example.md)
- [Data Analytics Example Notebooks](data_analytics.md)
- [Foundation API Example Notebooks](foundation_example.md)

<a id="package-dependencies"></a>

## Package dependencies

<a id="third-party-dependencies"></a>

### Third-party dependencies

These notebooks depend on third-party Python packages in addition to the MI Scripting Toolkit. The list below defines the requirements for running the notebooks:

- docx2pdf (&gt;=0.1.8,&lt;0.2.0)
- jupyterlab (&gt;=4.0.0,&lt;5.0.0)
- matplotlib (&gt;=3.6.0,&lt;4.0.0)
- numpy (&gt;=2.0.0,&lt;3.0.0)
- pandas (&gt;=2.1,&lt;3.0)
- python-docx (&gt;=1.1.0,&lt;2.0.0)
- python-pptx (&gt;=1.0.0,&lt;2.0.0)
- scipy (&gt;=1.11.0,&lt;2.0.0)
- seaborn (&gt;=0.13,&lt;0.14)
- tqdm\[notebook\] (&gt;=4.0,&lt;5.0)

Alternatively, if using pip, these can be installed automatically using the `[notebooks]` extra as follows:

```default
pip install GRANTA_MIScriptingToolkit[notebooks] --find-links=./path/to/whl/files

```

If you encounter dependency errors when installing the `[notebooks]` extra, you may need to first upgrade `pip`:

```default
python -m pip install --upgrade pip

```

<a id="pygranta-dependencies"></a>

### PyGranta dependencies

The following notebooks also depend on additional PyGranta packages:

> - [RecordLists and MI Scripting Toolkit](samples/streamlined/22_Record_Lists_Interoperability.md) requires `ansys-grantami-recordlists`.
> - [JobQueue and MI Scripting Toolkit](samples/streamlined/23_Job_Queue_Interoperability.md) requires `ansys-grantami-jobqueue`.

Minor versions of these packages are typically compatible with a single version of Granta MI only, so they are not provided as part of the `[notebooks]` extra described above. To easily identify the correct package version for your version of Granta MI, the [PyGranta](https://pypi.org/project/pygranta/) meta-package can be used. For example, installing `pygranta` v2024.2 will also install versions of `ansys-grantami-recordlists`and `ansys-grantami-jobqueue` that are compatible with Granta MI 2024 R2.

The [Package versions](https://grantami.docs.pyansys.com/version/dev/package_versions.html)section of the PyGranta documentation describes which versions of packages are installed with each version of the metapackage.

<a id="database-compatibility"></a>

## Database compatibility

These notebooks have been tested against the latest version of the MI Training database at the time of release. Every effort has been made to ensure the notebooks will execute without exceptions, even if they are run multiple times in succession by multiple users.

However, it is possible that changes made as a result of other training activities could result in these notebooks exhibiting unexpected behavior. If this happens, please try restoring a fresh copy of the MI Training database.