Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

Allow override of environment variables when calling load_dotenv #10

@rrodriguez44

Description

@rrodriguez44

Environment

  • Doppler Env version: 0.3.1
  • Python version: 3.10
  • Operating System: Windows 10

Description

By default the doppler cli overrides environment variables found in system. You must pass --perserve-env flag to avoid the override. By default load_dotenv does not override environment variables so the behavior is reversed. I would think this would be consistent.

I am running into an issue where one of my variables setup in a doppler config is the same key name as one used by our end user computer team sets up on our workstations and I have no way of getting the up to date value from my doppler config.

Is it possible to have the same behavior as the cli and override by default by passing override=True to the load_dotenv call? And have the ability to control this behavior via environment variable?

Steps to Reproduce

  1. Have a system environment variable key name same as one in doppler config
  2. Up to date value will not be retrievable through os.getenv method when setting doppler_env=1

Expected Behavior

I expected to get the up to date value from doppler config, overriding the system environment variable of the same name

Screenshots

N/A

Additional Details

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions