
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
toronto-hydro-green-button
Advanced tools
Export Green Button (ESPI) energy usage data from your Toronto Hydro account.
Toronto Hydro offers a Green Button XML export through the customer portal, but does not offer programmatic API access. This script logs into the dashboard with Selenium, then downloads the report with Requests.
Install with pip:
pip install toronto-hydro-green-button
The script needs your username and password to log into the dashboard. It will check, in order of precedence:
--username
/-u
and --password
/-p
argumentsTORONTO_HYDRO_USERNAME
and TORONTO_HYDRO_PASSWORD
environment variablesUse --start-date
and --end-date
to query data between two dates (inclusive).
$ toronto-hydro-green-button --start-date 2019-11-01 --end-date 2019-11-31
If ChromeDriver is installed, the script attempts to use it by default. Otherwise it falls back on headless Firefox. ChromeDriver was slightly faster in my limited testing.
Run toronto-hydro-green-button --help
for additional usage information.
Toronto Hydro usage data lags by 2–3 days. This script defaults to querying data from two days ago.
If you run this script frequently, you may not always see fresh data. It should be sufficient to run it daily.
MIT
FAQs
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.