concept

Environment Variables

Last updated: Thu Jun 18 2026 00:00:00 GMT+0000 (Coordinated Universal Time) Collection: concepts

Environment Variables

Environment Variables are the recommended home for secrets in Brevvie Python + AI — Section 4: APIs, Postman & Calling the Web. The source explicitly says API keys should never live in committed source code.

Core pattern from the source

  • put secrets in .env
  • add .env to .gitignore
  • load them into Python before making API calls
  • read them through os.environ
  • optionally use Python Dotenv to load .env automatically in local development

Why it matters

This is baseline operational hygiene for any code that talks to paid or rate-limited external services.