# make sure you do this first from dotenv import load_dotenv load_dotenv() # After that you should be able to do something like os.getenv('ACCES_TOKEN')