-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.py
56 lines (43 loc) · 1.59 KB
/
template.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
from azure_file import azure_methodes
from application_logging.logger import App_Logger
class Template:
"""
This class create all require directory through out the project .
Written By: Tejas Dadhaniya
Version: 1.0
Revisions: None
"""
def __init__(self):
self.file_object = "templates"
self.logger_object = App_Logger()
self.azure = azure_methodes(logger_object=self.logger_object,file_object=self.file_object)
self.dirs = [
'fb-archive-bad-raw',
'fb-archive-good-raw',
'fb-bad-raw',
'fb-good-raw',
'fb-metadata',
'fb-modelsforprediction',
'fb-myrecycle-bin',
'fb-predictedcsvfiles',
'fb-prediction-archive-bad-raw',
'fb-prediction-archive-good-raw',
'fb-prediction-bad-raw',
'fb-prediction-good-raw',
'fb-predictionfilefromdb',
'fb-predictionfiles',
'fb-trainfiles',
'fb-trainingfilefromdb'
]
def directory(self):
try:
self.logger_object.log(file_object=self.file_object,
log_message="Enter in directory method of template class.")
for dir_ in self.dirs:
self.azure.create_container(dir_)
self.logger_object.log(file_object=self.file_object,
log_message="Successfully created all directory..")
except Exception as e:
self.logger_object.log(file_object=self.file_object,log_message="Exception :: {} occurred template class.".format(e))
# m = Template()
# m.directory()