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

No code for mentioned variable in Settings Management #145

Closed
ikosmala opened this issue Aug 18, 2023 · 2 comments
Closed

No code for mentioned variable in Settings Management #145

ikosmala opened this issue Aug 18, 2023 · 2 comments
Assignees

Comments

@ikosmala
Copy link
Contributor

ikosmala commented Aug 18, 2023

In Settings Management in docs (https://docs.pydantic.dev/latest/usage/pydantic_settings/) there is information about two ways of setting up an alias for environment variable name.
Only one is present in code attached in docs.

There are two ways to do this:

Using Field(alias=...) (see api_key above)
Using Field(validation_alias=...) (see auth_key above)

Adding something like api_key: str = Field(..., alias='my_api_key') to presented code would fix orphaned mention.

Should I submit PR?

Selected Assignee: @Kludex

Selected Assignee: @hramezani

@Kludex Kludex transferred this issue from pydantic/pydantic Aug 18, 2023
@Kludex
Copy link
Member

Kludex commented Aug 18, 2023

Sure. Thanks! :)

ikosmala added a commit to ikosmala/pydantic-settings that referenced this issue Aug 19, 2023
hramezani added a commit that referenced this issue Aug 19, 2023
@hramezani
Copy link
Member

Closed in e100905

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

No branches or pull requests

3 participants