Daniel Feldroy 9/28/2025

TIL: Loading .env files with uv run

Read Original

This article explains that you can use the 'uv run' command with the '--env-file' flag to load environment variables from .env files, eliminating the dependency on python-dotenv. It provides examples for running FastAPI applications and suggests using different files like .env.dev or .env.prod for various environments.

TIL: Loading .env files with uv run

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser