Python
Add .env variable in Python
Add environment variable in Python
envenvironment
Interactive recipe
You can use below interactive recipe to generate code. This recipe is available in MLJAR Studio.
Python code
# Python code will be here
Code explanation
- Check if .env file exists.
- Open .env file, if file exists then open in append mode.
- Write new secret to the file.
- Please remember to remove this code cell after successful execution. Please save notebook.
Python cookbook
Code recipes from Python cookbook.
- Previous
- Get environment variable