Python Script to find all Environment Variables in a Codebase
Description
Create a Python Script to find all Environment Variables in a Codebase. It is usual to entirely forget about documenting the Environment Variables in your Project. Your Script should parse the entire codebase and find all the necessary environment variables and create a env.example file as the output.
Language
- [X] Python
Type of issue
Please delete options that are not relevant.
- [X] Feature
I would like to work on this issue but i don't know much about this, it will be so helpful if you could guide me through this.
Hi! I'll be trying this out and making a pull request. I am participating in the Hacktoberfest 2020. They have issued an update for maintainers you can see it here https://hacktoberfest.digitalocean.com/hacktoberfest-update Please help with this update. Have a good day!
Hi, I had a question regarding this issue. Do we take a python code file as input then parse it to find environment variables which have been set by the code? @HarshCasper
@Ishita-Mehta This Issue is open only for SLoP Participants. If you are a SLoP Participant I would love to assign it to you.
@narayan2111 You can ping me on Gitter Channel to have further clarity about the Issue.
@narayan2111 You can ping me on Gitter Channel to have further clarity about the Issue.
I would like to work on this issue, kindly assign this issue to me @HarshCasper
@narayan2111, this issue hasn't had any activity in 7 days. It will become unassigned in 14 days to make room for someone else to contribute.
I would like to work on this issue
Assigned @agrima84
May I work on this issue?
Hi,
Please review the idea I have for this. I'm planning to go through each python script in the codebase and check on each code line through regular expressions if it gets or sets any environment variable. If it does so, I'll be using a set/dictionary to save that variable. Finally having read all the scripts I'll write this set/dict to output file.
Let me know if you find this correct or suggest changes if you do not.
@HarshCasper What do you think?
Hi,
Please review the idea I have for this. I'm planning to go through each python script in the codebase and check on each code line through regular expressions if it gets or sets any environment variable. If it does so, I'll be using a set/dictionary to save that variable. Finally having read all the scripts I'll write this set/dict to output file.
Let me know if you find this correct or suggest changes if you do not.
This looks perfect! Please go ahead.
@SmritiAgrawal04, this issue hasn't had any activity in 7 days. It will become unassigned in 14 days to make room for someone else to contribute.
Hi @vybhav72954 and @HarshCasper Please check the added script.