Mentorship-backend: Add support for using environment variables

Created on 31 May 2018  路  5Comments  路  Source: anitab-org/mentorship-backend

Description

As a developer,
I need load environment variables,
so that I can protect sensitive app data and load app configuration.

In this way, we can avoid hardcoded app configurations.

Acceptance Criteria

Update [Required]

  • [x] Remove configuration selection inside of run.py file
  • [x] Define environment file and base variables (e.g.: APP_SETTINGS, SECRET_KEY, ...)

Definition of Done

  • [x] All of the required items are completed.
  • [x] PR should be sent to the gsoc18-code branch.
  • [x] Approval by 1 mentor.

Estimation

1 hour

Coding GSOC Enhancement

All 5 comments

@Dilu9218 @m-murad can you approve this? And if I got something wrong please mention that

Send a PR please

@m-murad @Dilu9218 submitted the PR #51 for this issue, if you see that I'm using the setup for environment variables wrong please suggest changes.

I'm assuming that a developer will have the .env and to export these variables of the app. I saw this library - python-dotenv - that allows exporting these with code within the app, but I'm not using it.

It looks ok to me. @m-murad any suggestion?

@Dilu9218
I have asked for some changes

Was this page helpful?
0 / 5 - 0 ratings