Website Health Checker
- 6 Devlogs
- 8 Total hours
An open-source Python library for real-time URL health checks and latency monitoring. Designed to be modular, lightweight, and freely reusable across any Python application or script.
An open-source Python library for real-time URL health checks and latency monitoring. Designed to be modular, lightweight, and freely reusable across any Python application or script.
Today, I set up unit testing for Website Health Checker using pytest and unittest.mock! I implemented test coverage in tests/test_checker.py to validate empty URL handling, successful HTTP status checks, timeout exceptions, connection errors, and batch URL processing. I also fixed case-sensitivity alignment between assertions and return values, successfully verifying all 5 unit tests passing in the Google Colab environment.
tests/test_cli.py to test CLI interface behavior, stdout formatting, and POSIX exit codes.github/workflows/ci-test.yml for automated GitHub Actions pipelineToday, I finalized the command-line interface (CLI) for Website Health Checker! I implemented argument parsing for multiple URLs, configurable timeouts, and version flags. I also added structured error output formatting with N/A fallbacks, standardized POSIX-compliant exit codes (0 for success, 1 for failures) using system.exit(), validated the exit status behavior in Google Colab subshells, and successfully merged Pull Request #7 into main using Squash and Merge.
Today, I implemented the foundational CLI interface for website-health-checker in cli.py to keep the user interface cleanly separated from the core logic! I configured argparse to handle multiple URL inputs, fixed an argparse import typo in commit 6f1a67a, and successfully verified the CLI execution in Google Colab by overriding pip caching with --no-cache-dir.
Add optional --timeout and --version CLI flags, and configure the package entry point in pyproject.toml
Today, I finalized the core URL checking logic and batch processing implementation! I added proper input sanitization, mapped network errors to user-friendly messages, cleaned up temporary interactive test code, and successfully merged Pull Request #6 into main using Squash and Merge.
Today, I focused on building the core check_website() function! The main goal for this phase was to measure website response time accurately in milliseconds and handle connection errors cleanly without crashing.
Today, this project officially started! The focus of the initial development phase is to build and sort out the basic folders and files inside my GitHub Codespace environment.
pyproject.toml
src/ layout