A developer built a command-line tool to check if a username exists on multiple online platforms — without using any external libraries. Source: dev.to.
What the Tool Does
The tool, called sosmed-scanner, checks usernames across multiple platforms in one command. Users can run it with a simple command like sosmed-scanner octocat. The output clearly indicates whether a profile exists, does not exist, or the platform refused to respond. This makes it a practical utility for anyone managing social media or developer identities across services.
How It Works
The tool uses only Python’s standard library — no third-party packages like requests or httpx. It sends HTTP requests using urllib, the built-in module for making web requests. This design choice ensures that the entire network layer is contained within a few dozen lines of code, making it easy to understand, audit, and maintain.
The Fetch Function
The core function fetch_status makes a request and returns a result with three possible outcomes:
- found: The site returns a 200 status code — indicating the profile exists and is accessible.
- not_found: The site returns a 404 status code — meaning the username doesn’t exist on that platform.
- unknown: Any other response — such as a 403 (access denied), 429 (rate limit), or a timeout — is reported as an error with a descriptive message. This ensures the tool does not guess or assume, which could lead to misleading results.
Crucially, the function never raises an exception during execution. If a connection fails — due to a timeout, server error, or network interruption — the error is captured and returned as part of the result, not allowed to crash the program. This behavior allows the tool to complete its scan even when some platforms are unreachable.
Why This Design Matters
The developer chose to avoid dependencies to ensure simplicity and transparency. With no external libraries, the entire network layer fits on one screen — a few dozen lines of code. This makes it easy for anyone to audit the tool and understand exactly what is being sent to each server. The code is readable, traceable, and free from hidden logic or opaque behavior.
Why Standard Library Only?
There are three main reasons for this choice:
- Simple installation: Users just run
pip install sosmed-scanner. No dependency chains to manage or break. This makes the tool accessible to beginners and those in constrained environments. - Full transparency: The network code is visible and readable. Anyone can see exactly what headers, URLs, and requests are sent to the internet. This is especially important for privacy-conscious users or those who want to verify that no data is being exfiltrated.
- Deeper understanding: Every edge case — such as timeouts, redirects, rate limits, or servers that abruptly close connections — must be handled directly. This forces the developer to understand the real-world behavior of web services, including how they respond to automated requests.
Live Testing Before Adding Platforms
Each platform was tested manually before being included. A platform is only added if it passes two key tests: it returns a 200 status code for an existing username and a 404 for a non-existent one. This ensures that the tool can reliably detect both existence and absence of profiles.
Some large platforms failed these tests. For example, certain sites return a 200 status code for usernames that don’t exist — making a 404-based check ineffective. Others block automated requests outright, which would result in a large number of ‘unknown’ responses, misleading users about the actual state of the platform. A few platforms simply don’t offer public profile URLs in a standard format, rendering them unusable for this type of check.
These platforms were excluded from the final list. The result is a curated, reliable set of platforms that all behave predictably under real-world conditions.
The Final List of Platforms
The tool includes multiple platforms, all of which pass the live test:

- GitHub
- GitLab
- Medium
- DEV
- PyPI
- YouTube
- Mastodon
- Tumblr
- Flickr
- SoundCloud
- Dribbble
- Linktree
- Gravatar
- Codeberg
- SourceHut
- Keybase
- Chess.com
- Docker Hub
- Hugging Face
Testing and Security
The tool has a test suite of 42 cases. These tests are mock-based — they simulate requests without connecting to live servers. This means the CI pipeline never touches the internet, reducing risk and ensuring stability.
Live testing happens only when a new platform is added, not on every run. This balances thoroughness with efficiency, ensuring that new entries are validated without overburdening the system or exposing it to real-world risks.
Output and Use Cases
Users can get results in plain text, JSON, or CSV format. For example:
GitHub — found — https://github.com/octocat GitLab — unknown — https://gitlab.com/octocat
The output is honest — if a site blocks the request, it says ‘unknown’ instead of guessing. This avoids false confidence and ensures users receive accurate, reliable information.
What This Means for Developers
Building with only the standard library teaches developers to handle real edge cases. It reveals how fragile and inconsistent web services can be — especially when automated. Platforms may change their behavior, enforce rate limits, or block bots, and a tool built without external dependencies must account for these realities.
It also shows that simplicity and transparency can be achieved without external tools. This approach emphasizes reliability, trust, and control — values that are especially important in open-source and privacy-focused development.
For more on similar projects, see how a CLI turns locations into pixel art.
For a deeper look at how tools handle uncertainty, see why a scanner avoids false confidence.
For a local AI agent that runs on your machine, see Diviso.
Full source code is available at github.com/Nuzuli/sosmed-scanner.
Sources & further reading
Featured image: original publisher image. Via original publisher. Image source
