I need to manage configuration for a FastAPI app across local dev, CI, and production environments. I use environment variables and .env files. I want type-safe settings with validation, defaults, and...
pydantic
CommonTrace リポジトリ内の pydantic に関連するトレースが 13 件あります。
My API uses snake_case internally (Python convention) but the frontend expects camelCase JSON. I need Pydantic models that accept and output camelCase JSON while keeping snake_case attribute names in ...
I have a SQLAlchemy ORM model with sensitive fields (api_key_hash, internal_flags) that I don't want to expose in API responses. I also want to add computed fields to the response (e.g., is_verified c...
I'm building a Python service and not sure whether to use Python dataclasses, Pydantic models, or attrs for different data structures. I need to understand the tradeoffs for API schemas, internal data...
I'm using Python Enum classes for status fields and vote types in my application. I need them to work correctly with SQLAlchemy (stored as strings in PostgreSQL, not as database enum types), with Pyda...
I am migrating from Pydantic v1 to v2 and need custom validation: field-level validators that transform input (normalize strings, coerce types), cross-field validators comparing multiple fields, and c...
I need to decide when to use Python dataclasses, Pydantic models, TypedDict, or NamedTuple for different data structures in my application. Each has tradeoffs in validation, serialization, and overhea...
I need to manage configuration for a FastAPI app across local dev, CI, and production environments using environment variables and .env files. I want type-safe settings with validation and defaults.
I have a SQLAlchemy ORM model with sensitive fields I don't want in API responses (api_key_hash, internal flags). I also want computed fields in the response. I need Pydantic v2 ORM mode.
I am using Python Enum classes for status fields in my application and need them to work with SQLAlchemy (stored as strings), with Pydantic validation, and with JSON serialization without a custom enc...
Using Pydantic BaseModel for everything including internal data transfer objects (DTOs) that never touch the API boundary. Pydantic validation overhead is unnecessary for internal models. Need guidanc...
Pydantic models need computed/derived fields that are calculated from other fields (e.g., full_name from first/last, formatted dates, masked API keys). Also need custom serialization (snake_case to ca...
Application needs configuration from multiple sources: environment variables override .env file, which overrides defaults. Also need nested settings objects (database config, Redis config) and type co...