Skip to content

Glossary: Building with LLMs Basics

.env file

Also written: dotenv, python-dotenv, load_dotenv

A plain text file with one `NAME=value` line per key. The `python-dotenv` package's `load_dotenv()` copies those lines into `os.environ` at startup, and `.gitignore` should list the file so it's never committed.

Where the book teaches it

Related terms

Environment variableAPI key