Metadata-Version: 2.1
Name: ansys-grantami-bomanalytics
Version: 1.0.0
Summary: Perform compliance analysis on materials data stored in Granta MI.
Home-page: https://github.com/pyansys/grantami-bomanalytics
License: MIT
Keywords: Ansys,Granta MI,Bill of Materials
Author: ANSYS, Inc.
Maintainer: PyAnsys Maintainers
Maintainer-email: pyansys.maintainers@ansys.com
Requires-Python: >=3.7,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Provides-Extra: doc
Provides-Extra: examples
Provides-Extra: test
Requires-Dist: ansys-grantami-bomanalytics-openapi (==1.0.0)
Requires-Dist: ansys-openapi-common (<2.0.0)
Requires-Dist: enum_tools (==0.9.0); extra == "doc"
Requires-Dist: importlib_metadata (>=1.0); python_version < "3.8"
Requires-Dist: ipython (==7.31.1); extra == "test"
Requires-Dist: jupyterlab (==3.2.8); extra == "doc" or extra == "examples"
Requires-Dist: jupytext (==1.13.3); extra == "doc"
Requires-Dist: lxml (==4.7.1); extra == "test" or extra == "doc" or extra == "examples"
Requires-Dist: nbsphinx (==0.8.7); extra == "doc"
Requires-Dist: numpydoc (==1.1.0); extra == "doc"
Requires-Dist: pandas (==1.3.5); extra == "test" or extra == "doc" or extra == "examples"
Requires-Dist: pyansys-sphinx-theme (==0.2.2); extra == "doc"
Requires-Dist: pytest (==6.2.5); extra == "test"
Requires-Dist: pytest-cov (==3.0.0); extra == "test"
Requires-Dist: requests-mock (==1.9.3); extra == "test"
Requires-Dist: sphinx (==4.4.0); extra == "doc"
Requires-Dist: sphinx-copybutton (==0.4.0); extra == "doc"
Requires-Dist: sphinx-notfound-page (==0.8); extra == "doc"
Requires-Dist: sphinx-toolbox (==2.17.0); extra == "doc"
Requires-Dist: sphinx_autodoc_typehints (==1.14.1); extra == "doc"
Requires-Dist: tabulate (==0.8.9); extra == "test" or extra == "doc" or extra == "examples"
Project-URL: Repository, https://github.com/pyansys/grantami-bomanalytics
Description-Content-Type: text/x-rst

ansys-grantami-bomanalytics
###########################

Project Overview
----------------
This project is part of the larger PyAnsys effort to facilitate the use
of Ansys technologies directly from within Python.

The Granta MI Restricted Substances solution includes a REST API for
evaluating compliance of products, assemblies, specifications and
materials against legislations. This package abstracts automatically-
generated code into an easy-to-use client library.


Installation
------------
Install ansys-grantami-bomanalytics with:

.. code::

   pip install ansys-grantami-bomanalytics

Alternatively, clone and install with:

.. code::

   git clone https://github.com/pyansys/grantami-bomanalytics
   cd grantami-bomanalytics
   pip install .


Documentation
-------------
`PyAnsys <https://grantami.docs.pyansys.com>`_


Usage
-----
Here's a brief example of how the package works:

.. code:: python

    # Connect and query the Granta service.

    >>> from pprint import pprint
    >>> from ansys.grantami.bomanalytics import Connection, queries
    >>> cxn = Connection(servicelayer_url='http://localhost/mi_servicelayer').with_autologon().connect()
    >>> query = (
    ...     queries.MaterialImpactedSubstancesQuery()
    ...     .with_material_ids(['plastic-abs-pvc-flame'])
    ...     .with_legislations(['REACH - The Candidate List'])
    ... )

    # Print out the result from the query.

    >>> result = cxn.run(query)
    >>> pprint(result.impacted_substances)
    [<ImpactedSubstance: {"cas_number": 10108-64-2, "percent_amount": 1.9}>,
     <ImpactedSubstance: {"cas_number": 107-06-2, "percent_amount": None}>,
     <ImpactedSubstance: {"cas_number": 115-96-8, "percent_amount": 15.0}>,
    ...


Testing
-------
See `Contributing <https://grantami.docs.pyansys.com/contributing>`_
for more details.


License
-------
The library is provided under the terms of the MIT license, you can find
the license text in the LICENSE file at the root of the repository.

