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

Uploaded Source

Built Distribution

tavosPy-0.1.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tavosPy-0.1.2.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

Hashes for tavosPy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ec00d25fa8181cc0dd4536466c7584be516d33b8d3ab8c8fcda8a314dc3085c8
MD5 44a14707abc7af1b3ad302bdaa0454da
BLAKE2b-256 bb6f2ee560203e08da18d0e041bcfc5b089f030d9375da4aa3e11e2bf25943a7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tavosPy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.1 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

Hashes for tavosPy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 928b5f68ecd8c49b79e7f2b6e0c461517aae2b38d20095dfcea856f8a4ccf0a4
MD5 fdbbe28dac7121f9c4e58c9d93439c9a
BLAKE2b-256 78bd8c6ea19b651a768567d9ce1dc0d7937f6201c7735f8e7dd9911aca01f5fd

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