<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>yaml on AI Logs</title><link>https://drafts.ragv.in/tags/yaml/</link><description>Recent content in yaml on AI Logs</description><generator>Hugo</generator><language>en-us</language><copyright>2025 Raghava Dhanya · License</copyright><lastBuildDate>Tue, 14 Nov 2023 11:54:11 +0530</lastBuildDate><atom:link href="https://drafts.ragv.in/tags/yaml/index.xml" rel="self" type="application/rss+xml"/><item><title>Keeping Configurations Sane with Pydantic Settings</title><link>https://drafts.ragv.in/posts/sane-configs-with-pydantic-settings/</link><pubDate>Tue, 14 Nov 2023 11:54:11 +0530</pubDate><guid>https://drafts.ragv.in/posts/sane-configs-with-pydantic-settings/</guid><description>&lt;p&gt;Configurations are a crucial aspect of any software project. There are many sources of configurations, such as environment variables, configuration files, and command-line arguments. For file-based configurations in python, YAML and TOML (or INI) are popular choices. I prefer YAML, though it is not without flaws, some of which can be addressed by Pydantic anyway like type safety etc.&lt;/p&gt;
&lt;p&gt;Pydantic is a data validation library for Python. It is built on top of Python type hints and provides runtime validation of data. Pydantic is widely used for data validation for APIs, but it can also be used for configuration management. Pydantic has a settings management library called &lt;code&gt;pydantic-settings&lt;/code&gt; that makes it easy to load configurations from multiple sources.&lt;/p&gt;</description></item></channel></rss>