mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
18 lines
587 B
Python
18 lines
587 B
Python
from utils.s3 import read_excel_from_s3
|
|
|
|
|
|
class UploadNonIntrusives:
|
|
"""
|
|
This class handles the upload of findings from the non-intrusive surveys, to the database
|
|
"""
|
|
|
|
def __init__(self, s3_template_location, s3_bucket):
|
|
self.s3_template_location = s3_template_location
|
|
self.s3_bucket = s3_bucket
|
|
self.template = self.read_template()
|
|
|
|
def read_template(self):
|
|
"""
|
|
This method reads the template from S3
|
|
"""
|
|
return read_excel_from_s3(file_key=self.s3_template_location, bucket_name=self.s3_bucket, header_row=0)
|