Using the dotenv
package we can easily load properties from a .env
file:
from dotenv import load_dotenv
import os
# Load the .env in the current directory
load_dotenv()
# Read a value
some_value = os.getenv("SOME_VALUE")
Using the dotenv
package we can easily load properties from a .env
file:
from dotenv import load_dotenv
import os
# Load the .env in the current directory
load_dotenv()
# Read a value
some_value = os.getenv("SOME_VALUE")