Skip to main content

Python client for Huawei FusionSolar SmartPVMS Northbound Interface

Project description

FusionSolar Northbound Interface Client

Provides a Python API to access Huawei FusionSolar web service to download SmartPVMS data. To login you need account on Huawei FusionSolar https://eu5.fusionsolar.huawei.com. Queried data are return as-is. Please refer to Huawei SmartPVMS Northbound Interface Reference V6 documentation for more details about data format.

Installation

The package is distributed with pip, and can be installed with the command line:

python3 -m pip install pyhfs

Usage

import pyhfs

try:
    with pyhfs.ClientSession(user='user', password='password') as client:
        plants = client.get_plant_list()
        print(plants)
except pyhfs.LoginFailed:
    print('Login failed. Verify user and password of Northbound API account.')

For more details about how to use the API, please check how_to.py.

Running tests

Testing requires a valid Northbound API account, which can be created from Fusion Solar system/company management interface. Tests will look for two environment variables to get user account (FUSIONSOLAR_USER) and password (FUSIONSOLAR_PASSWORD).

Use the following command from directory root to run the tests:

python3 -m unittest discover

Using CI

In case of a fork, these same variables (FUSIONSOLAR_USER and FUSIONSOLAR_PASSWORD) shall be added to github secrets in order for the CI to work.

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

pyhfs-0.1.1.tar.gz (10.0 kB view hashes)

Uploaded Source

Built Distribution

pyhfs-0.1.1-py3-none-any.whl (15.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