Skip to content

A simple Python tool to monitor website availability. It checks if a site is online, detects errors/timeouts, and logs results automatically. Includes pytest tests for reliability.

Notifications You must be signed in to change notification settings

A1cantar4/get-checker

Repository files navigation

Logo

Get-Checker (Terminal)

A simple Python project to monitor whether a website is online or offline. It periodically sends HTTP requests to the target website and logs the results. All the program will run in terminal chat.


Features

  • Check if a website is online (HTTP 200 OK).
  • Detect connection errors and timeouts.
  • Continuous monitoring with a configurable interval.
  • Logging to both console and file (monitor.log).
  • Unit tests with pytest.

Project Structure

get_checker/
│
├── get_checker/          # source code
│   ├── __init__.py
│   ├── checker.py        # website checking logic
│   └── logger.py         # logging setup
│   
├── tests/                # pytest tests
│   └── test_checker.py
│
├── .gitignore
├── requirements.txt      # dependencies
├── CHANGELOG.md
├── CONTRIBUTING.md
├── README.md             # project documentation
└── main.py               # main entry point

How to Install and Run the App.

1. Clone the repository:

git clone https://github.com/yourusername/get-checker.git
cd get-checker

2. Create and activate a virtual environment:

python -m venv venv
source venv/bin/activate   # on Linux/Mac
venv\Scripts\activate    # on Windows

3. Install dependencies:

pip install -r requirements.txt

4. Run the application:

python main.py

5. (Optitional) Check the Log

Open the get_checker.log to see all logs.


Requirements

  • Python 3.x (recommended: 3.11 or 3.12)
  • Requests (To sends HTTP requests)
  • pytest (for running tests).

How to Run Tests

1. Install pytest (installing requirements or this step):

pip install pytest

2. Run the tests:

pytest

Pytest will automatically discover tests inside the tests/ directory and run them.


Notes

Versão


License

This project is licensed under the MIT License.
See the LICENSE file for details.


Author

Lucas Alcântara
GitHub: @A1cantar4

About

A simple Python tool to monitor website availability. It checks if a site is online, detects errors/timeouts, and logs results automatically. Includes pytest tests for reliability.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages