import boto3
import os
from boto3.dynamodb.conditions import Key, Attr
from flask import Flask, render_template
app = Flask(__name__)

org = os.environ["TFE_ORG"]
dyn = boto3.resource('dynamodb')
table = dyn.Table('WorkspaceReaper-' + org)

def getSavings():
    savings = table.get_item(
        Key={
            'workspaceId': 'orgSavings'
        }
    )
    destructions = savings['Item']['destructions']
    return destructions

def getWorkspaces():
    workspaces = table.scan(
        FilterExpression=Attr('workspaceId').contains('ws-')
    )
    return workspaces['Items']

@app.route('/')
def resourcesDestroyed():
    return render_template('index.html', destructions=getSavings(), workspaces=getWorkspaces()
    )

app.run(host='0.0.0.0', port=8080, debug=True)

6204fbbbf9b9048e762263b3d81f9dee58f3b4e3
<mask token>


def getSavings():
    savings = table.get_item(Key={'workspaceId': 'orgSavings'})
    destructions = savings['Item']['destructions']
    return destructions


<mask token>

<mask token>


def getSavings():
    savings = table.get_item(Key={'workspaceId': 'orgSavings'})
    destructions = savings['Item']['destructions']
    return destructions


def getWorkspaces():
    workspaces = table.scan(FilterExpression=Attr('workspaceId').contains(
        'ws-'))
    return workspaces['Items']


@app.route('/')
def resourcesDestroyed():
    return render_template('index.html', destructions=getSavings(),
        workspaces=getWorkspaces())


<mask token>

<mask token>
app = Flask(__name__)
org = os.environ['TFE_ORG']
dyn = boto3.resource('dynamodb')
table = dyn.Table('WorkspaceReaper-' + org)


def getSavings():
    savings = table.get_item(Key={'workspaceId': 'orgSavings'})
    destructions = savings['Item']['destructions']
    return destructions


def getWorkspaces():
    workspaces = table.scan(FilterExpression=Attr('workspaceId').contains(
        'ws-'))
    return workspaces['Items']


@app.route('/')
def resourcesDestroyed():
    return render_template('index.html', destructions=getSavings(),
        workspaces=getWorkspaces())


app.run(host='0.0.0.0', port=8080, debug=True)

import boto3
import os
from boto3.dynamodb.conditions import Key, Attr
from flask import Flask, render_template
app = Flask(__name__)
org = os.environ['TFE_ORG']
dyn = boto3.resource('dynamodb')
table = dyn.Table('WorkspaceReaper-' + org)


def getSavings():
    savings = table.get_item(Key={'workspaceId': 'orgSavings'})
    destructions = savings['Item']['destructions']
    return destructions


def getWorkspaces():
    workspaces = table.scan(FilterExpression=Attr('workspaceId').contains(
        'ws-'))
    return workspaces['Items']


@app.route('/')
def resourcesDestroyed():
    return render_template('index.html', destructions=getSavings(),
        workspaces=getWorkspaces())


app.run(host='0.0.0.0', port=8080, debug=True)

import boto3
import os
from boto3.dynamodb.conditions import Key, Attr
from flask import Flask, render_template
app = Flask(__name__)

org = os.environ["TFE_ORG"]
dyn = boto3.resource('dynamodb')
table = dyn.Table('WorkspaceReaper-' + org)

def getSavings():
    savings = table.get_item(
        Key={
            'workspaceId': 'orgSavings'
        }
    )
    destructions = savings['Item']['destructions']
    return destructions

def getWorkspaces():
    workspaces = table.scan(
        FilterExpression=Attr('workspaceId').contains('ws-')
    )
    return workspaces['Items']

@app.route('/')
def resourcesDestroyed():
    return render_template('index.html', destructions=getSavings(), workspaces=getWorkspaces()
    )

app.run(host='0.0.0.0', port=8080, debug=True)
