Processes water outages from Tavos and provides them in a object with proper types
Project description
tavosPy
Processes water outages from Tavos and provides them in a object with proper types
Example usage
Print raw data
tavospy = TavosPy()
tavospy.update()
print(tavospy.getData())
Print data in human readable format
tavospy = TavosPy()
tavospy.update()
for waterOutage in tavospy.getData():
printString = ""
if(waterOutage['date']['start']):
printString = printString + waterOutage['date']['start'].strftime("%d.%m.%Y %H:%M")
if(waterOutage['date']['end']):
printString = printString + " - " + waterOutage['date']['end'].strftime("%d.%m.%Y %H:%M")
printString = printString + ": "
if(waterOutage['city'] != ""):
printString = printString + waterOutage['city']
if(waterOutage['street'] != ""):
printString = printString + " (" + waterOutage['street'] + ")"
if(waterOutage['typeOfDefect'] != ""):
printString = printString + " - " + waterOutage['typeOfDefect']
if(waterOutage['notes'] != ""):
printString = printString + " (" + waterOutage['notes'] + ")"
print(printString)
Disclaimer
Project and/or author is in no way associated with Tavos and provides this code completely free, according to LICENSE file.
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
tavosPy-0.1.4.tar.gz
(3.1 kB
view details)
Built Distribution
File details
Details for the file tavosPy-0.1.4.tar.gz
.
File metadata
- Download URL: tavosPy-0.1.4.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39c52841afe173a73d477719cae6d368740bb0eec3a331f28e79c84926496906 |
|
MD5 | bf19f74eb47c17da30acd8db42c24f75 |
|
BLAKE2b-256 | f135b3a3d6b4bcb0cf126e4d27026106a7b504021aa35016de72bead0ff09b2a |
File details
Details for the file tavosPy-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: tavosPy-0.1.4-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc87715c8cce05d9f042db9ef27ffdb2599a7f6e5e5f271577b265594ba1e1a4 |
|
MD5 | f2c74d6548e7d8336b6ab80e9e75ffeb |
|
BLAKE2b-256 | 6e3b28cd538388263631d3c9e21c732689a168c8c5d64f5c0fcc0698d169917b |