Skip to main content

Synchronous interface to the PVOutput API

Project description

pvoutput

PVOutput.org python API module. Works with the R2 API version spec here.

Get your API key from the account page on PVOutput

Code style: black

Example usage

> from pvoutput import PVOutput
> import json
> apikey = 'aaaaaabbbbbbccccccddddddeeeeeeffffffgggg'
> systemid = 12345
> pvo = PVOutput(apikey=apikey, systemid=systemid)
> print(json.dumps(pvo.check_rate_limit(), indent=2))
{
"X-Rate-Limit-Remaining": "271",
"X-Rate-Limit-Limit": "300",
"X-Rate-Limit-Reset": "1570597200"
}

Installing

Prod-ish usage

python3 -m pip install pvoutput to install

  • pipenv install -r requirements.txt or
  • pip install -r requirements.txt

Dev

Either:

  • pipenv install -r requirements-dev.txt or
  • pip install -r requirements-dev.txt

Testing

I'm using pytest as best I can. pipenv install --dev; pipenv run pytest should do it.

License

MIT License (see LICENSE), don't use this for anything you care about - I don't provide a warranty at all, and it'll likely steal your socks and underfeed your dog.

Changelog

  • 0.0.1 Initial version
  • 0.0.2 2019-10-12 Fixed some bugs
  • 0.0.3 2019-10-13 Added PVOutput.getstatus() which returns the current status as a dict
  • 0.0.4 2019-11-05 Code cleanup using sonarqube, added an error check for registernotification
  • 0.0.5 Asyncio things
  • 0.0.6 I broke the build when uploading to pypi, fixed in 0.0.7.
  • 0.0.7 2021-12-27 #117 fix for getstatus issues
  • 0.0.8 2022-01-02 @cheops did great work cleaning up a lot of my mess, and testing is much better.

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

pvoutput-0.0.8.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

pvoutput-0.0.8-py2.py3-none-any.whl (13.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pvoutput-0.0.8.tar.gz.

File metadata

  • Download URL: pvoutput-0.0.8.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for pvoutput-0.0.8.tar.gz
Algorithm Hash digest
SHA256 c996cd2e8ce3c1c55b3450efdff4b2842d89813388542f86a04ffdaf1094274a
MD5 f80cc0e58cac71d877f862278a897190
BLAKE2b-256 d64a878f493cb6fb9870a5b2c240eea213020415f017121e9aa0720b7ed6f51f

See more details on using hashes here.

File details

Details for the file pvoutput-0.0.8-py2.py3-none-any.whl.

File metadata

  • Download URL: pvoutput-0.0.8-py2.py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for pvoutput-0.0.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7aec1f8391f77361594a9dc318e46f08e5c64269540f704175bac600c56e7d64
MD5 2cdbdeb375fed05a46564ed73d767eb4
BLAKE2b-256 4f364b6f51e353a89493178cb2ab3595c88b9105297e8508faa543f5b25f3266

See more details on using hashes here.

Supported by

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