Skip to main content

Python library to communicate with Wood NEXUS IC tool

Project description

pynexusic

pynexusic is a package that allows communication with Wood NEXUS IC tool

Prerequisites

  • NEXUS IC V6.6
  • IC-Web V6.6

NEXUS IC Documentation

The NEXUS IC REST API documentation can be found in the below link:

https://docs.nexusic.com/6.6/ic-web.rest.v2.html

A specific NEXUS IC version can be specified in the above link by changing 6.6 to the desired NEXUS IC version

Python library installation

pip install pynexusic

Examples

  • Example 1: Get system version
    1. Import NEXUSIC_RESTAPI

      from pynexusic import NEXUSIC_RESTAPI as api
      
    2. Initialize NEXUSIC_REST class

      NX_REST = api.NEXUSIC_REST(baseURI, api_key=APIKey)
      

      where APIKey is the user's API Key provided by the system administrator

    3. Execute required function

      result, result_status_code = NX_REST.getVersion()
      

      Output:

      result = {'version': 'x.x.xxxxx.x', 'schema': 'x.xxx'}
      result_code = 200
      
  • Example 2: Run reports and get python object response
    1. Import NEXUSIC_RESTAPI

      from pynexusic import NEXUSIC_RESTAPI as api
      
    2. Initialize NEXUSIC_REST class

      NX_REST = api.NEXUSIC_REST(baseURI, api_key=APIKey)
      

      where APIKey is the user's API Key provided by the system administrator

    3. Execute required report

      result, result_status_code = NX_REST.getDashboard(report_name)
      

      where report_name is the name of the report to be executed in NEXUS IC

      Output:

      result = {'name': 'xxxxxxxxxxx', 
                'elements': [{'type': 'section', 'data': {}}, 
                             {'type': 'paragraph', 'data': {'text': [{'value': 'xxxxxx'}]}}
                            ]
                }
      result_code = 200
      

      The values of the elements key will contain the data configured in the NEXUS IC report template

Change history

####(V2.0.4) Changes:

  • NEXUSIC_RESTAPI:
    1. Added getAssetLocationByName function
    2. Added getAssetLocationByID function
    3. Added getAssetChildren function ####(V2.0.3) Changes:
  • NEXUSIC_RESTAPI:
    1. Added the ability to authenticate using two modes (APIKEY and BASIC)
      • APIKEY: Requires an API Key to authenticate
      • BASIC: Requires username and password ####(V2.0.2) Changes:
  • NEXUSIC_RESTAPI:
    1. Added the ability to by pass SSL verification ####(V2.0.1) Changes:
  • Initial deployment in pypi.org

License

This project is licensed under the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pynexusic-2.0.4.tar.gz (9.6 kB view hashes)

Uploaded Source

Built Distribution

pynexusic-2.0.4-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page