Getting started#
Software requirements#
This version of the ansys.grantami.bomanalytics package requires MI Restricted Substances and Sustainability Reports
2024 R2 or later. Use
the PyGranta documentation to find the
version of this package compatible with older MI Restricted Substances and Sustainability Reports versions.
MI Restricted Substances and MI Sustainability are licensed separately. Endpoints available to end users depend
on the available licenses.
The ansys.grantami.bomanalytics package currently supports Python version 3.10 through 3.13.
Installation#
To install the latest PyGranta BoM Analytics release from PyPI, run this command:
pip install ansys-grantami-bomanalytics
To install a release compatible with a specific version of Granta MI Restricted Substances and Sustainability Reports, install the PyGranta metapackage with a requirement specifier:
pip install pygranta==2023.2.0
To see which individual PyGranta package versions are installed with each version of the PyGranta metapackage, consult the Package versions section of the PyGranta documentation.
Alternatively, to install the latest development version from the PyGranta BoM Analytics repository, run this command:
pip install git+https://github.com/ansys/grantami-bomanalytics.git
To install a local development version with Git and Poetry, run these commands:
git clone https://github.com/ansys/grantami-bomanalytics
cd grantami-bomanalytics
poetry install
The preceding commands install the package in development mode so that you can modify it locally. Your changes are reflected in your Python setup after restarting the Python kernel.
Verify your installation#
Check that you can start the BomServices client from Python by running this code:
>>> from ansys.grantami.bomanalytics import Connection
>>> connection = Connection("my.server.name").with_autologon().connect()
>>> print(connection)
<BomServicesClient: url="my.server.name", dbkey="MI_Restricted_Substances">
This example uses Windows-based autologon authentication. For all supported authentication schemes, see the OpenAPI-Common documentation.
If you see a response from the server, congratulations. You can start using the BomAnalytics service. For information about available queries, see Examples. For more in-depth descriptions, consult API reference.