🌤️ Python Wrapper for MyWaterToronto REST API
This module communicates with the City of Toronto MyWaterToronto service.
The module is primarily written for the purpose of being used in Home Assistant for the Custom Integration called mywatertoronto .
This API will read the account information and obtain a list of address(es) and meter(s).
Consumption data incude
Unfortunately, the City of Toronto only appears to be pulling meter data every 1-2 days.
Install
pymywatertoronto is available on PyPi:
pip install pymywatertoronto
Consumption Buckets
This library will provide the following consumption buckets
Total usageToday usageWeek-to-date usageMonth-to-date usageYear-to-date usage
Usage
This library is primarily designed to be used in Home Assistant.
The main interface for the library is the pymywatertoronto.MyWaterToronto. This interface takes 6 options:
session: (required) An existing aiohttp.ClientSession.account_number: (required) Enter your Account No. found on the utility bill.client_number: (required) Enter your Client No. found on the utility bill.last_name: (required) Enter your Last Name - must match the first last name on the utility bill.postal_code: (required) Enter your Postal Code - must match the postal code on the utility bill.last_payment_method: (required) use the enumerations from const.LastPaymentMethod.
Copy the tests/template.env to tests/.env file and update the account information with your your City of Toronto account information:
ACCOUNT_NUMBER="000000000"
CLIENT_NUMBER="000000000-00"
LAST_NAME="lastname"
POSTAL_CODE="A1A 1A1"
LAST_PAYMENT_METHOD="4"
Use the enumerations from const.LastPaymentMethod.
Run the test file: python tests/test_mywatertoronto.py [-h or --dump]
--dump paramater will create two files containing data that is leveraged in the Home Assistant integration:
- data_account_details.json
- data_consumption.json
Metadata
Release files for pymywatertoronto 1.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pymywatertoronto-1.5.0.tar.gz | 12.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pymywatertoronto-1.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.8 kB
Release files / pymywatertoronto-1.5.0.tar.gz
| Download URL | pymywatertoronto-1.5.0.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f06427f141448c122e5920f5feca16f9bc109713ed026ed91bec1395fb50f0da
|
|
BLAKE2b-256 checksum How to use checksums |
9dc0509fb3885dd63dde7976e6b33723a3606cad86b7f61028207ce06ce54dc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / pymywatertoronto-1.5.0-py3-none-any.whl
| Download URL | pymywatertoronto-1.5.0-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6e4e68089d54703f82e2270ef43c079254f2ea25f07bd02d2047f0c239c37fa7
|
|
BLAKE2b-256 checksum How to use checksums |
fc3e36b70df6561dbbef15ab31c26044bfb961b3db9b8a871c7cca080810c50f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for pymywatertoronto 1.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.