Skip to content
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

support local dotenv #771

Merged
merged 1 commit into from
Jan 17, 2024
Merged

support local dotenv #771

merged 1 commit into from
Jan 17, 2024

Conversation

zzstoatzz
Copy link
Collaborator

closes #766

per pydantic docs

If you need to load multiple dotenv files, you can pass multiple file paths as a tuple or list. The files will be loaded in order, with each file overriding the previous one.

from pydantic_settings import BaseSettings, SettingsConfigDict


class Settings(BaseSettings):
    model_config = SettingsConfigDict(
        # `.env.prod` takes priority over `.env`
        env_file=('.env', '.env.prod')
    )

@zzstoatzz zzstoatzz merged commit a085804 into main Jan 17, 2024
14 checks passed
@zzstoatzz zzstoatzz deleted the dotenv branch January 17, 2024 00:56
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.

Azure OpenAI doesn't work with .env in project-specific directories
2 participants