Skip to main content

ucheck

pypiv pypipv

Autosubmit your UCheck COVID-19 self-assessment form

Disclaimer

  • ucheck automatically completes the University of Tornto's UCheck COVID-19 self-assessment form as follows:
    • YES: "Do any of the following statements apply to you? - I am fully vaccinated against COVID-19."
    • NO: "In the last 5 days, have you experienced any of these symptoms that are new, worsening, and not related to other known causes or conditions you already have?"
    • NO: "Do any of the following apply? - You live with someone who is currently isolating because of a positive COVID-19 test."
    • NO: "In the last 14 days, have you travelled outside of Canada and been told to quarantine per the federal quarantine requirements?"
    • NO: "Has a doctor, health care provider, or public health unit told you that you should currently be isolating (staying at home)?"
    • NO: "In the last 5 days, have you tested positive for COVID-19?"
  • If you do not satisfy these questions as listed, DO NOT use this library to complete your UCheck form. If you're interested in making these choices customizable, please raise an issue using the issues tracker.

Installation

pip install ucheck

Requirements and setup

This library uses Selenium to complete the UCheck form. If you're new to Selenium, it takes ~5 minutes to download and set up your browser driver. View how to download and configure a browser driver. If you're on macOS and hit permission issues, check out this Stackoverflow article.

ucheck is simple to use

import os
import time

from selenium.webdriver import Chrome
from selenium.webdriver.chrome.service import Service
from ucheck import UCheck

if __name__ == "__main__":
    # E.g., Save UTORid login and password as environment variables.
    utorid_login = os.environ["UTORID_USER"]
    utorid_pass = os.environ["UTORID_PASS"]
    with UCheck(Chrome, Service, driver_path="/opt/WebDriver/bin/chromedriver") as ucheck:
        ucheck.complete_ucheck(utorid_login, utorid_pass)
        # Briefly keep browser window open before closing.
        time.sleep(5)

Set up a Cron job to execute ucheck

Here's an option to fully automate your Ucheck form submission. If you're on a *NIX computer, add the following lines to your cron configuration file:

SHELL=/bin/bash
0 8 * * * source /path/to/ucheck_script/venv/bin/activate && DISPLAY=:0 python /path/to/ucheck_script/main.py

What the Cron job is doing:

  1. Everyday at 8 am
  2. Activate virtual environment to execute ucheck_script/main.py
  3. Execute ucheck_script/main.py, where main.py is the demo Python script posted above

You can find more information about setting up a Cron job here.

Exceptions

Valid UTORid credentials are required to complete your UCheck form.

import os

from selenium.webdriver import Chrome
from selenium.webdriver.chrome.service import Service
from ucheck import UCheck
from ucheck.exceptions import InvalidUTORidLogin

if __name__ == "__main__":
    # Set invalid user login credentials.
    utorid_login = "invalid-login"
    utorid_pass = os.environ["UTORID_PASS"]
    with UCheck(Chrome, Service, driver_path="/opt/WebDriver/bin/chromedriver") as ucheck:
        try:
            ucheck.complete_ucheck(utorid_login, utorid_pass)
        except InvalidUTORidLogin as e:
            print(e)

Contribute

Support

If you are having issues or would like to propose a new feature, please use the issues tracker.

License

The project is licensed under the MIT license.

Metadata

Release files for ucheck 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ucheck 0.0.6
File Size Uploaded Provenance
ucheck-0.0.6.tar.gz 1.1 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ucheck 0.0.6
File Interpreter ABI Platform
ucheck-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / ucheck-0.0.6.tar.gz

Download URL ucheck-0.0.6.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
da5cd7bfd28ddfdc52f53c91ba3076ea604c80f29e04c2bc51babbc315500107
BLAKE2b-256 checksum
How to use checksums
940aeeb3ad37f151c1ae3495f9a56964d7c3dd8d93fa8ae4814e5366b75f9a6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.26.0

Release files / ucheck-0.0.6-py3-none-any.whl

Download URL ucheck-0.0.6-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8c2c933bb93fc189b76c9fe7c64bfe544c096736adc6695350f634af774f51e
BLAKE2b-256 checksum
How to use checksums
e4e6f181b67139acd725be46ef4222859c27b3092d98fba6e54e85a77bce0db5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.26.0

Security for ucheck 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page