github Pinak-Datta/envgap v0.2.1
envgap v0.2.1

latest releases: v0.3.0, v0.2.2
3 months ago

What's new

envgap v0.2.1 improves Pydantic Settings support and includes the first community-contributed improvements.

Pydantic Settings aliases

envgap now understands common Pydantic Settings aliases:

from pydantic import Field
from pydantic_settings import BaseSettings

class Settings(BaseSettings):
    openai_api_key: str = Field(alias="OPENAI_KEY")

envgap will now treat OPENAI_KEY as the expected environment variable.

Pydantic env_prefix

envgap now supports common env_prefix declarations:

from pydantic_settings import BaseSettings, SettingsConfigDict

class Settings(BaseSettings):
    model_config = SettingsConfigDict(env_prefix="APP_")

    database_url: str

envgap will now treat APP_DATABASE_URL as the expected environment variable.

Also included

  • Support for Field(validation_alias=...)
  • Support for AliasChoices(...)
  • Better handling of unknown Pydantic settings config overrides
  • More typo-detection test coverage for common abbreviations
  • README comparison with related configuration tools

Contributors

Thanks to @JhansiOruganti-43 and @xuu33030 who contributed for this release.

Don't miss a new envgap release

NewReleases is sending notifications on new releases.