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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: tavosPy-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 bd780dbb34511eaa3915bda332751388a35d6f1cc1da8eee9fe1e562da02e0da
MD5 dc6491bcc6fddb0e36ed877c99460701
BLAKE2b-256 5c1947a95d7edba0b4f4e86c7b3a9cb52b233aaa278a1c0016ef3603c11a7e91

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tavosPy-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4ea32d7ff171832ecddd49076dfbc7a3ca221aca6ec1b08a8351208ee0ffc2fc
MD5 45ee79000f7e57f72ff7e0b4534245d6
BLAKE2b-256 5061db200d91db8842ede6d24b5844b4cfeccd7af4c77c8f3b17cdb58c41eddc

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