PulseRoute is a lightweight, zero-dependency (outside of requests) API health monitoring tool written in Python. It is designed for developers who need a simple, scriptable way to track the uptime and latency of multiple web services without the complexity of a full SaaS monitoring suite.

- Real-time Monitoring: Measures HTTP response codes and latency in milliseconds.
- Detailed Logging: Exports results to a structured
health_log.jsonfor easy parsing by other tools. - Robust Error Handling: Gracefully handles connection timeouts, DNS failures, and 400/500 level errors.
- Lightweight: Minimal CPU and memory footprint.
pulseroute/
βββ .gitignore # standard python ignore rules
βββ README.md # project documentation
βββ requirements.txt # external dependencies
βββ main.py # script entry point & config
βββ monitor.py # core monitoring logic
Ensure you have Python 3.8+ installed on your system.
Clone the repository and install the required dependencies:
# Clone the repository
git clone https://github.com/yourusername/pulseroute.git
cd pulseroute
# Install dependencies
pip install -r requirements.txt
Run the monitor using the default configuration:
python main.py
To monitor your own services, open main.py and update the TARGET_URLS list:
# main.py
TARGET_URLS = [
"https://api.myapp.com/health",
"https://db.service.io",
"https://google.com"
]When executed, PulseRoute provides immediate console feedback and writes to a file:
Console:
--- PulseRoute: Starting Health Check ---
β
https://www.google.com - 42.15ms
β
https://www.github.com - 89.32ms
β https://httpbin.org/status/404 - 35.1ms
Results saved to health_log.json
JSON Log (health_log.json):
[
{
"url": "https://www.google.com",
"status": 200,
"latency_ms": 42.15,
"timestamp": "2025-05-20T10:30:00.123456",
"online": true
}
]
Contributions are what make the open-source community such an amazing place to learn, inspire, and create.
- Fork the Project.
- Create your Feature Branch (
git checkout -b feature/AmazingFeature). - Commit your Changes (
git commit -m 'Add some AmazingFeature'). - Push to the Branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
Distributed under the MIT License. See LICENSE for more information.