Skip to content

Releases: emcniece/bchydro

0.8.1

05 Jan 08:21
4062b52
Compare
Choose a tag to compare
Updating doc examples, v0.8.1

Caching, Retries and Rate Limits

05 Jan 08:08
7660191
Compare
Choose a tag to compare
  • Automatic initial authentication
  • Automatic re-authentication on session expiry
    • Detected by the URL_POST_CONSUMPTION_XML request landing on the login page and/or malformed XML response
  • Automatic authentication for accessor methods that rely on refresh()
    • Prevents errors if the user doesn't run refresh() before fetching data
  • Retries for all methods that rely on remote data being present
  • Customized exceptions for faster identification in external systems (like Home Assistant)
  • Authentication rate limiting to prevent BCHydro account lockout
  • Lightweight data caching on refresh() to prevent API connection flooding
  • Cleaner delineation between async refresh-able methods and class data accessors
    • Asynchronous methods that invoke refresh: get_latest_point(), get_latest_interval(), get_latest_usage(), get_latest_cost()
    • Synchronous data accessors: self.latest_point, self.latest_interval, self.latest_usage, self.latest_cost

⚠️ Very breaking with v0.7.

Multi-account support

28 Dec 02:45
1e75fdc
Compare
Choose a tag to compare

This project now supports authentication for users that have multiple accounts within BCHydro as of #2. Thank you @Nebual!

PyPi publishing has also been adjusted to publish on release instead of commits to master branch.