Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace os.environ with dotenv for better environment variable management #68

Closed
Chanchal-D opened this issue Feb 24, 2025 · 3 comments · Fixed by #76
Closed

Replace os.environ with dotenv for better environment variable management #68

Chanchal-D opened this issue Feb 24, 2025 · 3 comments · Fixed by #76
Assignees

Comments

@Chanchal-D
Copy link
Contributor

Problem Statement

Currently, the repository uses os.environ[...] to access environment variables, which requires setting them manually in the system. This can lead to issues when running scripts across different environments.

Suggested Solution

Modify all scripts to use python-dotenv to load environment variables from a .env file. The new approach should follow this format:

import os
from dotenv import load_dotenv

load_dotenv()
API_KEY = os.getenv("API_KEY")
Copy link

👋 Thanks for contributing @Chanchal-D! We will review the issue and get back to you soon.

@koreyspace
Copy link
Contributor

Hi @Chanchal-D thanks for the suggestion, would you like to make a PR with these changes?

@Chanchal-D
Copy link
Contributor Author

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants