How to find the environment variable?

The “.env” method dosen’t seem to work when used. How to make use of this environment variable?

First of all, which language you are trying to use finding env variables?

2 Likes

I’m assuming you need to do it in Python, as it is your most recent project. Here’s how

import os

print(os.getenv("MY_SECRET"))

If this worked, please mark this as the solution.

4 Likes

Adding on to @OmegaOrbitals’ answer, you can set them in the Secrets tab.

2 Likes