Skip to content

Commit

Permalink
deploy: 18f0d2c
Browse files Browse the repository at this point in the history
  • Loading branch information
baniasbaabe committed Dec 14, 2024
1 parent 8b49c5e commit 4217340
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
14 changes: 13 additions & 1 deletion _sources/book/cooltools/Chapter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2440,7 +2440,19 @@
{
"cell_type": "markdown",
"metadata": {},
"source": []
"source": [
"Is this the best way to work with environment variables?\n",
"\n",
"**pydantic-settings** makes it so easy to work with your environment variables in an easy way.\n",
"\n",
"Why it's a great tool:\n",
"- Type-safe configuration with zero boilerplate \n",
"- Automatic environment variable loading \n",
"- Built-in validation and error handling \n",
"- Seamless .env file support\n",
"\n",
"For your settings, just create a class which inherits from **BaseSettings** and define your variables there."
]
},
{
"cell_type": "code",
Expand Down
10 changes: 10 additions & 0 deletions book/cooltools/Chapter.html
Original file line number Diff line number Diff line change
Expand Up @@ -1990,6 +1990,16 @@ <h2><span class="section-number">2.1.49. </span>Create CLI out of any Python Obj
</section>
<section id="environment-variables-management-with-pydantic-settings">
<h2><span class="section-number">2.1.50. </span>Environment Variables Management with <code class="docutils literal notranslate"><span class="pre">pydantic-settings</span></code><a class="headerlink" href="#environment-variables-management-with-pydantic-settings" title="Permalink to this heading">#</a></h2>
<p>Is this the best way to work with environment variables?</p>
<p><strong>pydantic-settings</strong> makes it so easy to work with your environment variables in an easy way.</p>
<p>Why it’s a great tool:</p>
<ul class="simple">
<li><p>Type-safe configuration with zero boilerplate</p></li>
<li><p>Automatic environment variable loading</p></li>
<li><p>Built-in validation and error handling</p></li>
<li><p>Seamless .env file support</p></li>
</ul>
<p>For your settings, just create a class which inherits from <strong>BaseSettings</strong> and define your variables there.</p>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span>!pip install pydantic-settings
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit 4217340

Please sign in to comment.