<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Miss hope on Medium]]></title>
        <description><![CDATA[Stories by Miss hope on Medium]]></description>
        <link>https://medium.com/@dharamittal103?source=rss-776f9b69994e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*jIJ8Y3hquSdYU8ni0_UJNA.jpeg</url>
            <title>Stories by Miss hope on Medium</title>
            <link>https://medium.com/@dharamittal103?source=rss-776f9b69994e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 10:04:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dharamittal103/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ZERO DEPENDENCY]]></title>
            <link>https://medium.com/@dharamittal103/zero-dependency-116c669f0cbe?source=rss-776f9b69994e------2</link>
            <guid isPermaLink="false">https://medium.com/p/116c669f0cbe</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Miss hope]]></dc:creator>
            <pubDate>Wed, 02 Sep 2026 02:57:46 GMT</pubDate>
            <atom:updated>2026-09-02T02:57:46.271Z</atom:updated>
            <content:encoded><![CDATA[<h3>What Happens When You Remove Every Dependency?</h3><p><em>A password wallet, a Python standard library, and 72 hours to find out what our dependencies were really doing for us.</em></p><p>There is a comfortable lie in modern software development.</p><p>When we write:</p><pre>from flask import Flask</pre><p>we see one line.</p><p>We don’t see everything underneath it.</p><p>We don’t see HTTP parsing, routing, request handling, response construction, server lifecycle management, or concurrency.</p><p>When we install a cryptography library, we see an import.</p><p>We don’t see the years of engineering required to make cryptographic primitives usable.</p><p>When we install a testing framework, we see a command.</p><p>We don’t see the machinery behind test discovery, assertions, fixtures, and reporting.</p><p>Usually, that’s exactly how software should work.</p><p><strong>Abstraction is useful.</strong></p><p>But Zero Dependency 2026 asked us to remove that abstraction.</p><p>So we decided to build something that normally has a very healthy dependency list:</p><h3>A password wallet.</h3><p>Our goal was deliberately simple:</p><blockquote><strong><em>Build a useful local password wallet using only Python’s standard library.</em></strong></blockquote><p>No third-party runtime packages.</p><p>No framework.</p><p>No external CSS or JavaScript framework.</p><p>No database abstraction.</p><p>No testing framework.</p><p>Just Python.</p><p>And then we discovered that “just Python” is a surprisingly large place.</p><h3>The project</h3><p>Our project is <strong>Vault</strong>, a single-file, local password verification wallet.</p><p>The entire application lives in:</p><pre>password_wallet.py</pre><p>That file contains the Python server, API handling, verification logic, HTML, CSS and browser-side JavaScript.</p><p>The application can be launched with:</p><pre>python password_wallet.py</pre><p>No installation step is required. The repository uses an intentionally empty requirements.txt, and the runtime and tests rely on Python&#39;s standard library.</p><p>The wallet provides:</p><ul><li>Master-password protection</li><li>Password generation</li><li>Password-strength feedback</li><li>Categories for entries</li><li>Search and filtering</li><li>Username and URL copying</li><li>Password verification without revealing the stored password</li><li>Local JSON persistence</li><li>A browser-based interface</li><li>Vault locking</li><li>Automated tests</li></ul><p>But the most important design decision is not visible in the UI.</p><p><strong>We don’t store recoverable passwords.</strong></p><h3>The first uncomfortable question: what exactly is a “password wallet”?</h3><p>Most people expect a password manager to work like this:</p><pre>Save password<br>      ↓<br>Store encrypted password<br>      ↓<br>Unlock vault<br>      ↓<br>Decrypt password<br>      ↓<br>Show password</pre><p>We chose a different model.</p><p>Our wallet is a <strong>verifier-only wallet</strong>.</p><p>When a password is saved, the application creates a salted PBKDF2-HMAC-SHA256 verifier.</p><p>Conceptually:</p><pre>password + random salt<br>          ↓<br>   PBKDF2-HMAC-SHA256<br>          ↓<br>       verifier<br>          ↓<br>       wallet.json</pre><p>The original password is not persisted.</p><p>Later, when a user wants to verify a password:</p><pre>entered password + stored salt<br>             ↓<br>      PBKDF2-HMAC-SHA256<br>             ↓<br>      derived verifier<br>             ↓<br>     constant-time comparison<br>             ↓<br>        match / no match</pre><p>The current implementation uses <strong>200,000 PBKDF2 iterations and a 16-byte random salt per entry</strong>, with constant-time HMAC comparison.</p><p>That creates an important property:</p><blockquote><strong><em>The application can verify a password without being able to recover the saved password.</em></strong></blockquote><p>This isn’t the same thing as building a production-grade encrypted password manager.</p><p>And we don’t pretend that it is.</p><p>The project’s threat model explicitly limits its scope: it is designed to avoid plaintext storage and immediate recovery of saved passwords from the local vault, but it does not claim to defend against malware, keyloggers, browser extensions, screenshots, or a compromised machine.</p><p>That distinction matters.</p><p>Especially in security software.</p><h3>Then we removed Flask</h3><p>The obvious way to build a small Python web application is to reach for a framework.</p><p>We didn’t.</p><p>Python’s standard library already contains:</p><pre>http.server</pre><p>So instead of installing a web framework, we built the local server around the standard library’s HTTP server functionality.</p><p>The result is less convenient than Flask.</p><p>And that was the point.</p><p>Frameworks make web development pleasant because they hide complexity.</p><p>Without one, you start noticing things you normally never have to think about:</p><ul><li>How requests are parsed</li><li>How paths are handled</li><li>How responses are constructed</li><li>How the server lifecycle works</li><li>How concurrent requests are handled</li></ul><p>A dependency didn’t disappear.</p><p><strong>The abstraction disappeared.</strong></p><p>And underneath it was a surprisingly understandable amount of machinery.</p><h3>We didn’t need a database either</h3><p>For a small local wallet, introducing a complete database stack would have been unnecessary.</p><p>The vault uses JSON persistence.</p><p>Python already gives us:</p><pre>json</pre><p>The resulting data file contains the master-password verifier, entry metadata, and salted password verifiers rather than plaintext passwords.</p><p>This forced a useful design question:</p><blockquote><strong><em>Do we actually need a dependency, or do we need a capability?</em></strong></blockquote><p>Those aren’t the same thing.</p><p>We didn’t need “a database.”</p><p>We needed:</p><blockquote><em>reliable local persistence for a small amount of structured data.</em></blockquote><p>JSON was enough.</p><h3>The cryptography problem was different</h3><p>This was the part where “zero dependency” could have become dangerous.</p><p>If a library wasn’t available, it would be tempting to write our own encryption algorithm.</p><p>That would be exactly the wrong lesson to take from this hackathon.</p><p>The challenge specifically discourages implementing custom cryptographic algorithms.</p><p>So we stayed within primitives Python already provides.</p><p>For password derivation and verification, we used:</p><pre>hashlib.pbkdf2_hmac</pre><p>For constant-time comparison:</p><pre>hmac.compare_digest</pre><p>For cryptographically appropriate randomness:</p><pre>secrets</pre><p>The standard library didn’t magically turn us into cryptographers.</p><p>It gave us established primitives.</p><p>Our job was to compose them responsibly.</p><p>That distinction became one of the most important lessons of the project:</p><blockquote><strong><em>Zero dependency does not mean reinvent everything. It means understand what you are using.</em></strong></blockquote><h3>The password generator looked easy</h3><p>It wasn’t difficult.</p><p>But it was another place where the standard library already had the right answer.</p><p>The wallet’s generator supports configurable:</p><ul><li>Length</li><li>Uppercase characters</li><li>Lowercase characters</li><li>Digits</li><li>Symbols</li></ul><p>The current implementation allows passwords from 8 to 64 characters.</p><p>Instead of using an external password-generation package, we use:</p><pre>secrets<br>string</pre><p>The important part is that credential generation uses a security-oriented randomness source rather than ordinary pseudo-random generation.</p><p>Again, the capability was already there.</p><p>We just had to know where to look.</p><h3>Then came the frontend</h3><p>This was where our “single file” constraint became almost absurd.</p><p>We wanted:</p><ul><li>A usable interface</li><li>A dark-mode design</li><li>Password-generation controls</li><li>Search</li><li>Categories</li><li>Verification</li><li>Locking</li><li>Copy actions</li></ul><p>Normally, we’d split this across:</p><pre>Python<br>Flask<br>Templates<br>CSS<br>JavaScript<br>Frontend libraries</pre><p>Instead:</p><pre>password_wallet.py</pre><p>The entire application lives there.</p><p>Python server.</p><p>HTML.</p><p>CSS.</p><p>JavaScript.</p><p>Password verification.</p><p>Persistence.</p><p>API.</p><p>Everything.</p><p>The repository describes this explicitly: the single file contains the server, UI and verification logic.</p><p>That wasn’t necessarily the most elegant architecture we’d choose for a production application.</p><p>But it made the experiment extremely clear.</p><p>There was nowhere for the dependencies to hide.</p><h3>The dependency list we never installed</h3><p>This is probably the most interesting artifact of the project.</p><p>Our STDLIB.md documents the packages we might normally reach for and the standard-library functionality we used instead.</p><p>For example:</p><p>NormallyInsteadFlaskhttp.serverbcrypthashlib.pbkdf2_hmacpytestunittestSQLAlchemyjsonJinja2Embedded HTMLclipboard.jsBrowser Clipboard APIFakersecrets + stringgunicornThreadingHTTPServerpython-dotenvos</p><p>This table is more meaningful than simply saying:</p><blockquote><strong><em>“We have zero dependencies.”</em></strong></blockquote><p>Because it answers the next question:</p><blockquote><strong><em>“How?”</em></strong></blockquote><p>And that question is where the hackathon became interesting.</p><h3>The standard library corner we didn’t know existed</h3><p>Before this project, “Python standard library” was easy to mentally reduce to a few familiar modules:</p><pre>os<br>json<br>math<br>random<br>datetime</pre><p>That mental model was badly incomplete.</p><p>We ended up using standard-library capabilities across networking, cryptography, randomness, parsing, persistence, testing, concurrency and browser integration.</p><p>Our current inventory includes:</p><pre>base64<br>hashlib<br>hmac<br>http.server<br>json<br>os<br>secrets<br>string<br>threading<br>time<br>unittest<br>urllib.parse<br>webbrowser</pre><p>The standard library was not merely a toolbox of small utilities.</p><p>It was enough to form the backbone of an entire application.</p><p>That was probably the biggest surprise.</p><h3>Testing without pytest</h3><p>We also had to give up one of the most common Python testing tools.</p><p>No pytest.</p><p>Fortunately:</p><pre>unittest</pre><p>is already there.</p><p>Our tests cover areas including:</p><ul><li>Salted password verification</li><li>Malformed verifier handling</li><li>Master-password verification</li><li>Password-generation rules</li><li>JSON storage</li><li>Legacy-file detection</li><li>Malformed requests</li><li>HTTP API lifecycle</li></ul><p>The repository can run the test suite with:</p><pre>python -m unittest discover -s tests -v</pre><p>and syntax-check the main application with:</p><pre>python -m py_compile password_wallet.py</pre><p>Again, the package didn’t disappear.</p><p>We simply went one layer down.</p><h3>What turned out harder than the documentation suggested</h3><p>The difficult part wasn’t any single function.</p><p>It was the boundaries between functions.</p><p>A password wallet has sensitive information moving through several places:</p><pre>Browser<br>   ↓<br>HTTP request<br>   ↓<br>Python server<br>   ↓<br>Verification logic<br>   ↓<br>Memory<br>   ↓<br>Persistent storage</pre><p>Every arrow is a potential security question.</p><p>What is stored?</p><p>What stays in memory?</p><p>What gets returned to the browser?</p><p>What happens when the vault locks?</p><p>What happens when a malformed request arrives?</p><p>What happens when an old vault format is encountered?</p><p>What happens when the user loses the vault file?</p><p>The project explicitly clears the master password and current entry metadata when the vault is locked, and it rejects older encrypted-format wallet files rather than silently interpreting them.</p><p>Those details don’t make for flashy screenshots.</p><p>But they’re where the engineering lives.</p><h3>The uncomfortable trade-off</h3><p>The most important thing we learned may be something that sounds almost anti-hackathon:</p><p><strong>Zero dependencies does not automatically mean better software.</strong></p><p>A mature third-party library can provide:</p><ul><li>More features</li><li>Better ergonomics</li><li>More extensive testing</li><li>Years of maintenance</li><li>Security review</li><li>Compatibility work</li></ul><p>Removing it doesn’t automatically improve the result.</p><p>What zero dependency does give you is something different:</p><p><strong>visibility.</strong></p><p>You are forced to understand the layers you normally skip.</p><p>That is valuable.</p><p>But it also means you inherit responsibility for those layers.</p><h3>What we would never claim</h3><p>We would never describe this project as a replacement for a professionally reviewed password manager.</p><p>That isn’t modesty.</p><p>It’s engineering honesty.</p><p>The current security model deliberately avoids encryption and instead stores one-way PBKDF2-HMAC-SHA256 verifiers. As a result, the application cannot recover the saved passwords — which is useful for its intended verification model, but fundamentally different from a conventional encrypted password vault.</p><p>That limitation belongs in the documentation.</p><p>Especially because this is a security project.</p><p>A security tool should tell you not only:</p><blockquote><strong><em>“Here’s what I protect.”</em></strong></blockquote><p>but also:</p><blockquote><strong><em>“Here’s what I don’t.”</em></strong></blockquote><h3>What “zero dependency” actually taught us</h3><p>At the beginning of the challenge, we thought the interesting question would be:</p><blockquote><strong><em>“Can we build a password wallet without installing packages?”</em></strong></blockquote><p>The better question turned out to be:</p><blockquote><strong><em>“What were those packages actually doing for us?”</em></strong></blockquote><p>Flask was doing HTTP and routing work.</p><p>bcrypt was solving a password-derivation problem.</p><p>pytest was providing a testing ecosystem.</p><p>SQLAlchemy was providing an abstraction over persistence.</p><p>Jinja2 was handling templating.</p><p>Clipboard libraries were wrapping browser capabilities.</p><p>And beneath all of those abstractions were systems we could access directly.</p><p>Sometimes the standard library already had what we needed.</p><p>Sometimes it didn’t.</p><p>Sometimes the correct answer wasn’t to recreate a missing library at all.</p><p>And sometimes the hardest part was recognizing the difference.</p><h3>The real lesson</h3><p>Software engineering is often described as building things from components.</p><p>But components can make us forget what the components contain.</p><p>Zero Dependency forced us to look underneath.</p><p>Not because dependencies are bad.</p><p>Not because frameworks are unnecessary.</p><p>Not because everyone should write their own HTTP server.</p><p>They shouldn’t.</p><p>The value was in removing the convenience temporarily and seeing what remained.</p><p>We started with a password wallet.</p><p>We ended up with a better understanding of:</p><ul><li>HTTP</li><li>password derivation</li><li>randomness</li><li>persistence</li><li>testing</li><li>client-server boundaries</li><li>threat modelling</li><li>standard-library design</li><li>and the true cost of abstractions</li></ul><p>The most useful thing we built wasn’t the absence of a requirements.txt entry.</p><p>It was the understanding behind it.</p><p>Because once you know what a dependency is actually doing for you, you can make a much better decision about whether you need it.</p><p><strong>That is what zero dependency meant to us.</strong></p><p>Not <em>never install a package.</em></p><p>But:</p><blockquote><strong><em>Know what you’re standing on before you build on top of it.</em></strong></blockquote><h3>The project</h3><p><strong>Vault — Password Wallet</strong></p><p>A local, single-file Python password verification wallet built entirely with the standard library.</p><p><strong>Repository:</strong><br><a href="https://github.com/Dhara103/password-wallet?utm_source=chatgpt.com">Dhara103/password-wallet</a></p><p><strong>Runtime dependencies:</strong> 0</p><p><strong>Core security primitive:</strong> PBKDF2-HMAC-SHA256</p><p><strong>Storage model:</strong> Salted password verifiers, not recoverable plaintext passwords</p><p><strong>Interface:</strong> Local browser-based UI</p><p><strong>Testing:</strong> Python unittest</p><p><strong>Build/run:</strong> python password_wallet.py</p><p><strong>Standard-library documentation:</strong> STDLIB.md</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=116c669f0cbe" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>