@lovelacecoding
Microsoft MVP | Developer | Speaker | Content Creator
Heya! I'm Lou. I love coding and trying out new technology. I've been interested in a lot of different tech fields for 5 years now. I like to blog about stuff I'm currently learning about or about topics I hear / speak about on other social media platforms.
I'm also Microsoft MVP.
Want to hear more from me? Follow me or check me out on Twitter.
Content creation, Dad jokes, Technical writing, Public Speaking Events
Sandeep You're right about python being case-sensitive. But these are environment variables, not Python variables. What makes environment variables so easy to work with is that the variables you create in your .env file are saved onto your local OS. When you use os.environ you tell Python that it has to search on your OS for the needed variable, nothing more. Sounds very technical because it is. Just remember that using uppercase for the variables in your .env file is the easiest way to not get complications if you want someone else to use your code.
No, it's a naming convention. Keep in mind (if you want to do it differently) that Windows is case-insensitive with global variables. Linux and Mac OS are not. Meaning that if you have a variable called 'Language' and you use os.environ['language'], it will work if you run it on Windows but not on MacOS or Linux