Home | Legal Tech | Projects | Writings

Breach Countdown

Keeps track of the time since breach.


  1. Install the [module] module
  2. Write the Script
  3. Initiate Timer
  4. Recall and Restart the Timer

1. Install the Module

The python modules we need to install are called 'arrow' and 'click'.

If you are unsure how to install this module, check the guide at python basics.

2. Write the Script

Open up your text editor and enter the following script:

import arrow
import click

def settime():
    utc = arrow.utcnow()
    target = utc.clone()
    target = target.replace(days=+3)
    with open("target.txt", "w") as target_file:

def printtime(target):
    utc = arrow.utcnow()

def gettime():
    target = ""
    with open("target.txt", "r") as target_file:
        line_1 = target_file.read()
        target = arrow.get(line_1)
@click.option('-n', is_flag=True)
def time_handler(n):
    if n:

if __name__ == '__main__':

Save it as "breachtimer.py".

Starting and Recalling the Timer

To use the timer, either navigate in your terminal to the folder breachtimer.py is saved in, or save it in your "bin" folder and make it executable. For a reminder of how to do this, see the python basics page in the theory section.

Setting the timer

To set the timer, run breachtimer with the "-n" flag.

$ breachtimer.py -n

This will start a new timer.

Setting the timer

To recall timer the timer to see how long is left, run breachtimer.py without any flags.

$ breachtimer.py

Better get a move on with that breach report!