The project's app pings web hosts to ensure they are up.
If not, that means the power network is off.
Then, the app sends an alarm message to specific Telegram
and Viber
users.
- Git clone the project:
git clone https://github.com/Mixail132/CheckServer.git
- Create a virtual environment:
python -m venv .venv
- Activate the virtual environment:
cd .venv/scripts
activate.bat
- Install the project requirements:
pip install -r requirements.txt
- Save the
example_vars.ini
file asvars.ini
:cd app
copy example_vars.ini vars.ini
- Fill the
vars.ini
file with your data. - Make sure you have set up at least one
Telegram
orViber
bot. - If you haven't, create your
Viber
orTelegram
bot. - Save the
example_vars.ini
file asvars.ini
:cd app
copy example_vars.ini vars.ini
- If you have Viberbot copy your logo file from
static
to theapp
folder:copy static/your_viberbot_logo.jpg app/your_viberbot_logo.jpg
- Run the tests:
cd ..
python -m pytest -с .github\settings\pytest.ini
- Run the script:
CheckServer.exe
- .github -
GitHub
actions and linters settings; - .temp - linters and pytest cache files, build files;
- .venv - virtual environment components;
- app - the project's application files;
- audit.py - the project's main actions
- builder.py - the
CheckServer.exe
file builder; - CheckServer.exe - tha main output executable project's file;
- example_vars.ini - the project's configuration variables example;
- vars.ini - a user's configuration and secret variables;
- linter.py - the code checking with launching linters;
- your_viberbot_logo.jpg - the
Viber
bot logo file; - dirs.py - the relative path's to the project's folders;
- main.py - the project's main logic handler;
- telegram.py -
Telegram
bot logic and settings; - viber.py -
Viber
bot logic and settings; - vars.py - the project's configuration file reading;
- static - images and media files;
- ico.ico - the
CheckServer.exe
icon;
- ico.ico - the
- tests - the project's tests.
- requirements.txt - the project's Python modules.