Relative Content

Tag Archive for pythonpydantic

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.

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.