fix: add load dotenv on encryption file#1430
Merged
Merged
Conversation
edwinjosechittilappilly
requested changes
Apr 17, 2026
Collaborator
edwinjosechittilappilly
left a comment
There was a problem hiding this comment.
can we check on the Fast api Lifespan or on startevent in fast api.
edwinjosechittilappilly
approved these changes
Apr 20, 2026
Collaborator
edwinjosechittilappilly
left a comment
There was a problem hiding this comment.
On clean up Lets move this to Fast API Lifespan in future.
Collaborator
|
@lucaseduoli can we add it to lifespan ? |
edwinjosechittilappilly
previously requested changes
Apr 20, 2026
Collaborator
edwinjosechittilappilly
left a comment
There was a problem hiding this comment.
Lucas on discussion can you explore the adding of loading env to lifepsan or onstart event of fast api for stability. since this is a crucial change.
Collaborator
Author
Can't do that, since just by importing the data in main, it causes a lot of files to be imported and to read the env. Importing it on the top level does the trick. |
zzzming
approved these changes
Apr 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces an update to the
src/utils/encryption.pyfile to improve environment variable loading. The main change is the addition of logic to ensure environment variables are loaded from both the default.envfile and a parent directory, if available.Environment variable loading:
dotenvintegration to load environment variables from the current directory and the parent directory, ensuring configuration values are accessible in various deployment environments.