Skip to content

Feat: Add support for dot env file to load variables from #4840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 30, 2025

Conversation

themisvaltinos
Copy link
Contributor

This update allows environment variables being loaded from a .env file in the project directory, fixes: #4405

Example .env file:

SNOWFLAKE_PW=my_secret_password
S3_BUCKET=s3://my-data-bucket/warehouse

# Override SQLMesh config values
SQLMESH__DEFAULT_GATEWAY=production
SQLMESH__MODEL_DEFAULTS__DIALECT=snowflake

@themisvaltinos themisvaltinos merged commit eb8a5b7 into main Jun 30, 2025
26 checks passed
@themisvaltinos themisvaltinos deleted the themis/dotenv branch June 30, 2025 09:51
@@ -79,6 +79,7 @@ dev = [
"PyAthena[Pandas]",
"PyGithub>=2.6.0",
"pyperf",
"python-dotenv",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@themisvaltinos we need to move this to dependencies– this isn't a dev dependency, because the .env functionality requires that this package is installed on the user's system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.env file to load in environment variables easily for gateway configs
4 participants