Skip to main content

Pydantic Settings Doppler

CI codecov Pydantic v2 only PyPI - Implementation PyPI - Python Version PyPI - License PyPI - Version

Pydantic Settings for Doppler integration! This package provides a seamless way to load configuration values from Doppler into your Pydantic models. It leverages the power of Doppler's secrets management and Pydantic's settings management to make your application configuration secure and easy to use.

🚀 Features

  • Secure: Fetch secrets directly from Doppler.
  • Simple: Integrates seamlessly with Pydantic's BaseSettings.
  • Flexible: Supports environment variable fallbacks and default values.

📦 Installation

Install the package using pip:

pip install pydantic-settings-doppler

🛠️ Usage

Here's a quick example to get you started:

from pydantic_settings import BaseSettings
from pydantic_settings.sources import PydanticBaseSettingsSource
from pydantic_settings_doppler import DopplerSettingsSource


class Settings(BaseSettings):
    database_url: str
    api_key: str

    @classmethod
    def settings_customise_sources(
        cls,
        settings_cls: type[BaseSettings],
        init_settings: PydanticBaseSettingsSource,
        env_settings: PydanticBaseSettingsSource,
        dotenv_settings: PydanticBaseSettingsSource,
        file_secret_settings: PydanticBaseSettingsSource,
    ) -> tuple[PydanticBaseSettingsSource, ...]:
        return (
            init_settings,
            DopplerSettingsSource(
                settings_cls,
                token="your-doppler-token",
                project_id="your-project-id",
                config_id="your-config-id",
            ),
            env_settings,
            dotenv_settings,
            file_secret_settings,
        )


# Load settings
settings = Settings()
print(settings.database_url)
print(settings.api_key)

📖 Documentation

For more details, check out the Doppler documentation and Pydantic documentation.

🧑‍💻 Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

⚖️ License

This project is licensed under the MIT License.

Metadata

Release files for pydantic-settings-doppler 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydantic-settings-doppler 0.1.2
File Size Uploaded Provenance Actions
pydantic_settings_doppler-0.1.2.tar.gz 4.6 kB With provenance Details for pydantic_settings_doppler-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pydantic-settings-doppler 0.1.2
File Interpreter ABI Platform Actions
pydantic_settings_doppler-0.1.2-py3-none-any.whl Python 3 none any Details for pydantic_settings_doppler-0.1.2-py3-none-any.whl

Total release size: 9.6 kB

Release files / pydantic_settings_doppler-0.1.2.tar.gz

Download URL pydantic_settings_doppler-0.1.2.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
09600aeac6ae217af80b40e3f8967ca1b6b018f1f2a8a2e0ab275ac1bbdf3364
BLAKE2b-256 checksum
How to use checksums
ad77988b15da246852e3ea2aba1f4e720f02658fb635913ad1f694791eb8350d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 23, 2025.

Transparency log

Release files / pydantic_settings_doppler-0.1.2-py3-none-any.whl

Download URL pydantic_settings_doppler-0.1.2-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
344e71b44ee27bc0311219ebf4562719f6fbccaee2981bad4716c0f1c30d45b0
BLAKE2b-256 checksum
How to use checksums
c39eb36bd75f62a08cd4e733f91b7b632aadfc7504766370d0cee1bfc3b70065
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 23, 2025.

Transparency log

Security for pydantic-settings-doppler 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pydantic_settings_doppler-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 23, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page