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

Uploaded Source

Built Distribution

tavosPy-0.3-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tavosPy-0.3.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

File hashes

Hashes for tavosPy-0.3.tar.gz
Algorithm Hash digest
SHA256 741783c801ae1b43798aea789279e62d180d4eda38b30394958adb534e8e1bda
MD5 1c2986133e9bfb6b7896d9b50368a2f4
BLAKE2b-256 6c2976a2ba81cb01d2656784e3bdeafcc49a98ac93677d90d562ddfbe91309a2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tavosPy-0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

File hashes

Hashes for tavosPy-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 599d8f619847adfcf4cca3ebb98d0ae1371988296469950f96d9cde4c7875f1a
MD5 d101eff89adc016f9ce64d8395ec7c03
BLAKE2b-256 e980a0c4e6053fc726259446afdde6be4f4599731001c166db89aebde6700053

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