Skip to main content

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.5.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

tavosPy-0.5-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file tavosPy-0.5.tar.gz.

File metadata

  • Download URL: tavosPy-0.5.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.26.0 setuptools/60.10.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.13

File hashes

Hashes for tavosPy-0.5.tar.gz
Algorithm Hash digest
SHA256 848b62abc255c44258b8737b5e389b2366bc41b1cb29e0da075fa3edc6436dd6
MD5 e24068db6a1a6ec0094952185902e378
BLAKE2b-256 3f32b971dd0cef1f9790cbf60004cff5812c9de2f282122a42097a8ed1013913

See more details on using hashes here.

File details

Details for the file tavosPy-0.5-py3-none-any.whl.

File metadata

  • Download URL: tavosPy-0.5-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.26.0 setuptools/60.10.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.13

File hashes

Hashes for tavosPy-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7de66886b4c677274a4caa14764dcd8f562cb2d193b97e41ac7d7814c5da601a
MD5 ea17fae2fe85079d4932bf96e83cc680
BLAKE2b-256 509ec327c4777b2b2cd46382132ac044701c5f577320296c9f28d8a19efba439

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page