pydantic model: How to exclude field from being hashed / eq-compared?
I have the following hashable pydantic model:
pydantic model: How to exclude field from being hashed / eq-compared?
I have the following hashable pydantic model:
Pydantic Dynamic .env Files
I’m new to pydantic, I want to use it for Settings management in my app, I have a monorepo with some overrides. I wonder what is the “Pydantic” way of initializing the Settings class with a dynamic list of .env files.
Pydantic Dynamic .env Files
I’m new to pydantic, I want to use it for Settings management in my app, I have a monorepo with some overrides. I wonder what is the “Pydantic” way of initializing the Settings class with a dynamic list of .env files.
Pydantic Dynamic .env File
I’m new to pydantic, I want to use it for Settings management in my app, I have a monorepo with some overrides. I wonder what is the “Pydantic” way of initializing the Settings class with a dynamic list of .env files.
validate object in pydantic 1.x where values are sometimes camelCase and sometimes PascalCase
Having the following object
Pydantic model for representing datetime as date and time
I have created a Pydantic model for datetime that will handle parsing a JSON object that looks like { "date": "2021-07-01", "time": "12:36:23" }
into datetime(2021, 7, 1, 12, 36, 23)
. It also generates the correct JSON Schema for the model.
Pydantic model_json_schema updated field description
I am trying to update the descriptions of fields in my class such that the original field description is changed from what is defined in the Field function. The example code is below, unfortunately when I call model_json_schema it still prints out Meatball.
Pydantic model_json_schema updated field description
I am trying to update the descriptions of fields in my class such that the original field description is changed from what is defined in the Field function. The example code is below, unfortunately when I call model_json_schema it still prints out Meatball.
How to correctly type a Pydantic model to handle string input for a list[float] with validation before initialization?
I’m using Pydantic to define a model where one of the fields, embedding, is expected to be a list[float]. However, I want to be able to pass a string to this field, and then have a validator transform this string into a list[float] before initialization.