Python library for tracking water consumption from BVK (Brnenske vodarny a kanalizace, bvk.cz)
Water conspmution scraper for BVK (Brnenské vodárny a kanalizace, bvk.cz)
Note that you need to have the "smart" water-gauge installed. If you don't know what that is you probably don't have one. If you don't have one you have to ask them (BVK) to install it for you and you may have to wait a potentially long time - they are rolling them out gradually.
pip install python-bvk
To create the client object you need to provide your BVK username/password (the one you use on the customer portal https://zis.bvk.cz/).
from bvk import Bvk from dateutil import parser # Create client bvk = Bvk('username', 'password')
getwaterConsumption() method to get the water consumption data. It accepts
date_from and optionally a
date_to, both of which have to be a
date_to is not specified the method returns data to today.
# Get water consumption data from the specified date to now date_from = parser.parse('2020-08-01').date() data = bvk.getWaterConsumption(date_from); # Get water consumption data for a date interval date_from = parser.parse('2020-08-01').date() date_to = parser.parse('2020-08-11').date() data = bvk.getWaterConsumption(date_from, date_to); # Get water consumption data for a specific date (just 1 day) date = parser.parse('2020-08-01').date() data = bvk.getWaterConsumption(date, date);
Keep in mind the library is using Scrapy internally which means it is scraping the BVK customer portal to get the data. If BVK comes to think you are abusing the website they may block your IP address and/or account.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size python_bvk-0.1.4-py3-none-any.whl (11.5 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size python-bvk-0.1.4.tar.gz (6.9 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for python_bvk-0.1.4-py3-none-any.whl