Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kl_task5
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
arun.uday
kl_task5
Commits
5f081c11
Commit
5f081c11
authored
Jan 30, 2023
by
arun.uday
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
6d87d9e1
5ad85be7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
scripts/config/application_config.py
+14
-12
No files found.
scripts/config/application_config.py
View file @
5f081c11
# Reading the conf file
# Reading the conf file
import
configparser
import
configparser
from
scripts.constants.app_constants
import
exception_msg
# config object
# config object
config
=
configparser
.
RawConfigParser
()
try
:
config
.
read
(
"conf/application.conf"
)
config
=
configparser
.
RawConfigParser
()
config
.
read
(
"conf/application.conf"
)
# reading paths from conf file
path_excel
=
config
.
get
(
"file_path"
,
"excel_path"
)
path_time
=
config
.
get
(
"file_path"
,
"json_time"
)
path_pivot
=
config
.
get
(
"file_path"
,
"json_pivot"
)
path_melt
=
config
.
get
(
"file_path"
,
"json_melt"
)
path_merge
=
config
.
get
(
"file_path"
,
"json_merge"
)
# reading paths from conf file
# reading date format from conf file
path_excel
=
config
.
get
(
"file_path"
,
"excel_path"
)
date_format
=
config
.
get
(
"Date_format"
,
"date_format"
)
path_time
=
config
.
get
(
"file_path"
,
"json_time"
)
except
Exception
as
e
:
path_pivot
=
config
.
get
(
"file_path"
,
"json_pivot"
)
print
(
f
'{exception_msg} {e}'
)
path_melt
=
config
.
get
(
"file_path"
,
"json_melt"
)
path_merge
=
config
.
get
(
"file_path"
,
"json_merge"
)
# reading date format from conf file
date_format
=
config
.
get
(
"Date_format"
,
"date_format"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment