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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyhfs-0.1.1.tar.gz
.
File metadata
- Download URL: pyhfs-0.1.1.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 783cf60afc035a4b1b7bcf3de294cfba4a847fa347dde1c00031aea1c29628c2 |
|
MD5 | eeb79b85957709350a6d96c30848df3d |
|
BLAKE2b-256 | f27fb20253f0a489900f9f44c4eaba3b1a6e05a86a0218a282345fb087436e68 |
File details
Details for the file pyhfs-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pyhfs-0.1.1-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7594a90e72e76ad1984806ab7307e0491077b5a23d8032370697a010089da95 |
|
MD5 | 546b5391d784e6cde632f1a45b06150f |
|
BLAKE2b-256 | 72a6987ff9047bf49a164689733e3ff73b71ce0d28a8e074774420d1987e4cb6 |