Skip to content

Instantly share code, notes, and snippets.

@asraful
Last active April 2, 2020 13:35
Show Gist options
  • Save asraful/6b2b03076eccb10f83a6229626103226 to your computer and use it in GitHub Desktop.
Save asraful/6b2b03076eccb10f83a6229626103226 to your computer and use it in GitHub Desktop.
# ------------------------------------------------------------------------------
# Sample Configuration file : config.txt
# [rds_config]
# run_rds_test_scripts = false
#
# [mysql]
# arn = "any_value"
# host = "any_value"
#------------------------------------------------------------------------------
import configparser
def read_configuration(value):
print(value)
def _inti_():
config = configparser.ConfigParser()
configFilePath = 'config.txt'
config.read(configFilePath)
mysql_arn = config.get('mysql', 'arn')
run_rds_test_scripts = config.get('rds_config', 'run_rds_test_scripts')
if run_rds_test_scripts == 'true':
print('run')
read_configuration(mysql_arn)
else:
print('no run')
_inti_()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment