Sample
pydantic-settings 2.14.2: pydantic_settings.SettingsConfigDict
Verified sample for pypi pydantic-settings 2.14.2: pydantic_settings.SettingsConfigDict. The contract ran on python 3.12 · linux alpine/x64 · docker and…
sha256:1807e23acdeed8b24c53e41a6eab635528d4b6ce7831a5ef502a991da54c10fd
This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured.
How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people.
MIT-0
Execution evidence
The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.
- Evidence basis
- Signed contract pass
- Verification receipts
- 1
- Signing keys that built it
- 1
Declared environment
linux 24 · ubuntu · glibc 2.39 x64 pip
Verification-run environments
| Environment | Contract | Stages | Run |
|---|---|---|---|
| python 3.12 · linux alpine/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · python@1python:3.12-alpine@sha256:d09d15e60962… |
2026-08-27 |
Case
HOW- Goal
- verify pydantic_settings.SettingsConfigDict in pkg:pypi/pydantic-settings@2.14.2
- Packages
- Symbols
-
- pydantic_settings.SettingsConfigDict
- Created
- 2026-08-27T19:32:23Z
Contract
- SettingsConfigDict(env_prefix='APP_') prefixes environment variable lookup for settings fields
- SettingsConfigDict(env_nested_delimiter='__') parses nested model fields from delimited environment variables
- SettingsConfigDict(case_sensitive=True) requires exact case match for prefixed environment variables
Files
- PROMPT.md
- csx.json
- requirements.txt
- spec.json
- test/contract.py
Source
Clean-room public code sample — generation instructions
Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.
A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.
Goal: verify pydantic_settings.SettingsConfigDict in pkg:pypi/pydantic-settings@2.14.2
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:pypi/pydantic-settings@2.14.2
Demonstrate these symbols/APIs:
- pydantic_settings.SettingsConfigDict
Rules:
- One focused purpose; the smallest project that proves the goal.
- Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
- Pin every dependency with a lockfile so resolution is reproducible.
- No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
- No personal names, emails, company names, or project identifiers of any kind.
- No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
- Keep it under 200 files and 256KB packed.
{"case":{"caseId":"case:sha256:65ec818bbc2996c88557f293dbbd9a9f06fba70b23004d0d3ed172c054656f9d","contract":["SettingsConfigDict(env_prefix='APP_') prefixes environment variable lookup for settings fields","SettingsConfigDict(env_nested_delimiter='__') parses nested model fields from delimited environment variables","SettingsConfigDict(case_sensitive=True) requires exact case match for prefixed environment variables"],"goal":"verify pydantic_settings.SettingsConfigDict in pkg:pypi/pydantic-settings@2.14.2","kind":"HOW","packages":["pkg:pypi/pydantic-settings@2.14.2"],"schemaVersion":1,"symbols":["pydantic_settings.SettingsConfigDict"]},"contractCommand":["python","test/contract.py"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"pypi","libc":"glibc","libcVersion":"2.39","os":"linux","osVersionBucket":"24","packageManager":"pip","schemaVersion":1},"license":"MIT-0","packages":["pkg:pypi/pydantic-settings@2.14.2"],"schemaVersion":1,"subject":"pkg:pypi/pydantic-settings@2.14.2","symbols":["pydantic_settings.SettingsConfigDict"],"verifierAdapter":"python@1"}
pydantic-settings==2.14.2
pydantic==2.13.4
pydantic-core==2.46.4
annotated-types==0.8.0
typing-extensions==4.15.0
typing-inspection==0.4.2
python-dotenv==1.2.2
{
"schemaVersion": 1,
"goal": "verify pydantic_settings.SettingsConfigDict in pkg:pypi/pydantic-settings@2.14.2",
"kind": "HOW",
"packages": [
"pkg:pypi/pydantic-settings@2.14.2"
],
"symbols": [
"pydantic_settings.SettingsConfigDict"
]
}
import os
from pydantic import BaseModel
from pydantic_settings import BaseSettings, SettingsConfigDict
class DatabaseConfig(BaseModel):
host: str = "localhost"
class AppSettings(BaseSettings):
model_config = SettingsConfigDict(
env_prefix="APP_",
env_nested_delimiter="__",
case_sensitive=False,
)
host: str = "localhost"
port: int = 8080
database: DatabaseConfig = DatabaseConfig()
class StrictCaseSettings(BaseSettings):
model_config = SettingsConfigDict(
env_prefix="APP_",
case_sensitive=True,
)
endpoint: str = "default_endpoint"
def main() -> None:
tracked_keys = [
"APP_HOST",
"APP_PORT",
"APP_DATABASE__HOST",
"APP_ENDPOINT",
"APP_endpoint",
"HOST",
]
saved_env = {k: os.environ.get(k) for k in tracked_keys}
try:
# Set environment variables
os.environ["APP_HOST"] = "10.0.0.1"
os.environ["APP_PORT"] = "9000"
os.environ["APP_DATABASE__HOST"] = "db.internal"
os.environ["HOST"] = "ignored.example.com"
# 1. Test env_prefix and env_nested_delimiter
settings = AppSettings()
assert settings.host == "10.0.0.1", f"Expected '10.0.0.1', got '{settings.host}'"
assert settings.port == 9000, f"Expected 9000, got {settings.port}"
assert settings.database.host == "db.internal", f"Expected 'db.internal', got '{settings.database.host}'"
# 2. Test case_sensitive=True
os.environ["APP_ENDPOINT"] = "uppercase_val"
strict_case = StrictCaseSettings()
assert strict_case.endpoint == "default_endpoint", (
f"Expected default 'default_endpoint' under case_sensitive=True, got '{strict_case.endpoint}'"
)
os.environ["APP_endpoint"] = "exact_val"
strict_case_exact = StrictCaseSettings()
assert strict_case_exact.endpoint == "exact_val", (
f"Expected 'exact_val', got '{strict_case_exact.endpoint}'"
)
finally:
for k, v in saved_env.items():
if v is None:
os.environ.pop(k, None)
else:
os.environ[k] = v
if __name__ == "__main__":
main()
Origin Seeder
anonymous