pydantic-settings-sops
SOPS extension for pydantic-settings.
This package allows you to read SOPS files into a pydantic-settings object.
You can install this package via
pip install pydantic-settings-sops
# or
pixi add pydantic-settings-sops
Example
To use pydantic-settings-sops, adjust your settings sources by defining a custom settings_customise_sources.
For more information on pydantic-settings, please visit the official documentation.
from pydantic_settings import (
BaseSettings,
PydanticBaseSettingsSource,
SettingsConfigDict,
)
from pydantic_settings_sops import SOPSConfigSettingsSource
class SettingsExample(BaseSettings):
model_config = SettingsConfigDict(
yaml_file="secrets.yaml"
)
foobar: str
@classmethod
def settings_customise_sources(
cls,
settings_cls: BaseSettings,
init_settings: PydanticBaseSettingsSource,
env_settings: PydanticBaseSettingsSource,
dotenv_settings: PydanticBaseSettingsSource,
file_secret_settings: PydanticBaseSettingsSource,
) -> tuple[PydanticBaseSettingsSource, ...]:
return (init_settings, SOPSConfigSettingsSource(settings_cls))
Installation
This project is managed by pixi. You can install the package in development mode using:
git clone https://github.com/pavelzw/pydantic-settings-sops
cd pydantic-settings-sops
pixi run pre-commit-install
pixi run postinstall
pixi run test
Metadata
Release files for pydantic-settings-sops 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pydantic_settings_sops-0.1.2.tar.gz | 57.7 kB | With provenance | Details for pydantic_settings_sops-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pydantic_settings_sops-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for pydantic_settings_sops-0.1.2-py3-none-any.whl |
Total release size: 61.6 kB
Release files / pydantic_settings_sops-0.1.2.tar.gz
| Download URL | pydantic_settings_sops-0.1.2.tar.gz |
|---|---|
| Size | 57.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d03ea8233cec696b4737563947bc668a7cd4a2773252b40948f850784d718cd
|
|
BLAKE2b-256 checksum How to use checksums |
047be45527771f7f92a1a31bd569a3b092c70ba33b50e8bf7dc18189e8e74057
|
| 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 May 14, 2025.
Transparency logRelease files / pydantic_settings_sops-0.1.2-py3-none-any.whl
| Download URL | pydantic_settings_sops-0.1.2-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e13d68d2630921d4ba1b45806b26d4a38a5bdc8880dba41d439591d331ce903
|
|
BLAKE2b-256 checksum How to use checksums |
deebadb8bb3873f4925b3c0c6c223b356ae51303cc9a2068f4f40e9a1d118cbe
|
| 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 May 14, 2025.
Transparency logSecurity for pydantic-settings-sops 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.
Attestation for pydantic_settings_sops-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 May 14, 2025.
Transparency logA 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.