Skip to main content

A (relatively) lightweight library for programmatically submitting entries to SUTD's Temperature Taking System, without Selenium and the like.

Project description

A (relatively) lightweight library for programmatically submitting entries to SUTD’s Temperature Taking System, without Selenium and the like.

Submit a temperature declaration in three steps:

from sutd.tts import TemperatureReading, User

me = User("1003333", "password")
me.login().take_temperature(TemperatureReading.OK)

Do your daily declaration while you’re at it: (By default, it assumes you pressed “NO” to every checkbox)

from sutd.tts import DailyDeclaration, User

me = User("10003333", "password")
me.login().do_daily_declaration(DailyDeclaration())

Installation

pip install sutd-tts-lib

Examples

Different kinds of temperature readings:

from sutd.tts import TemperatureReading, User

me = User("1003333", "password")
me.login() # only needs to be called once
me.take_temperature(TemperatureReading.OK)
me.take_temperature(TemperatureReading.HIGH_TEMP_BUT_OK)
me.take_temperature(TemperatureReading.HIGH_TEMP_NOT_OK)

Customize your daily declaration via the constructor or instance attributes.

This example declares that you both got served a SHN and you came into close contact with someone who also had SHN/quarantined.

from sutd.tts import DailyDeclaration, User

d = DailyDeclaration(received_SHN=True)
d.contact_SHN = True

me = User("1003333", "password")
me.login().do_daily_declaration(d)

More information are available in the docstrings of the classes.


Prof Chong, I don’t feel so good:

from sutd.tts import DailyDeclaration, User

d = DailyDeclaration()
d.symptoms.dry_cough = True
d.symptoms.fever = True

me = User("1003333", "password")
me.login().do_daily_declaration(d)

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

sutd-tts-lib-0.1.1.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

sutd_tts_lib-0.1.1-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

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