<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Abdillah Issa</title>
    <description>The latest articles on DEV Community by Abdillah Issa (@hudihi).</description>
    <link>https://dev.to/hudihi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3933170%2F9fa20879-bde8-49a0-afc1-1953285dca1c.png</url>
      <title>DEV Community: Abdillah Issa</title>
      <link>https://dev.to/hudihi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hudihi"/>
    <language>en</language>
    <item>
      <title>frozenenv: typed environment variables as a frozen dataclass, zero dependencies Meta</title>
      <dc:creator>Abdillah Issa</dc:creator>
      <pubDate>Fri, 15 May 2026 12:39:42 +0000</pubDate>
      <link>https://dev.to/hudihi/frozenenv-typed-environment-variables-as-a-frozen-dataclass-zero-dependenciesmeta-2g1m</link>
      <guid>https://dev.to/hudihi/frozenenv-typed-environment-variables-as-a-frozen-dataclass-zero-dependenciesmeta-2g1m</guid>
      <description>&lt;p&gt;Tired of writing this in everty project:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PORT = int(os.environ.get("PORT", "8000"))
DEBUG = os.environ.get("DEBUG", "false").lower() == "true"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;frozenenv fixes that with one decorator:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   from envclass import envclass

   @envclass
   class Config:
      DATABASE_URL: str
      PORT: int = 8000
      DEBUG: bool = False
      ALLOWED_HOSTS: list[str] = []

 cfg = Config()
 print(cfg.PORT) # 8000 - actual int, not "8000"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Zero dependencies: pure Python stdlib&lt;/li&gt;
&lt;li&gt;Type coercion: str, int, float, bool, list[X], Optional[X]&lt;/li&gt;
&lt;li&gt;Frozen - Config is immutable after creation&lt;/li&gt;
&lt;li&gt;Built-in .env support: no python-dotenv needed&lt;/li&gt;
&lt;li&gt;Fails at startup: not buried in runtime&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;install: pip install frozenenv&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="//github.com/hudihi/frozenenv"&gt;github.com/hudihi/frozenenv&lt;/a&gt;&lt;br&gt;
Full writeup: &lt;a href="//medium.com/@abdillahissa/there-a-cleaner-way-to-handle-environment-variables-and-it-takes-one-decorator-69f0ef3997eb"&gt;there-a-cleaner-way-to-handle-environment-variables-and-it-takes-one-decorator&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>python</category>
      <category>showdev</category>
      <category>tooling</category>
    </item>
  </channel>
</rss>
