Programa de monitoramento de código python, desenvolvido para ser utilizado pelas funcionário da Agência de dados
Project description
Monit
Instalação:
pip install monit-agd
Exemplo arquivo .env:
# Project info
PROJECT=sample_project
COMPANY=acme
LOCATION=ec2
DEV=coder
# Database info
DB_USER=user
DB_PASSWORD=p@ssw0rd
DB_HOST=localhost
DB_DATABASE=teste
Exemplo de Uso:
import time
from monit.core import Monitor
from monit.error import SetupError
def main():
# Initialize the Monitor
monit = Monitor()
try:
# Your code that might raise exceptions
# For demonstration purposes, let's raise an exception
time.sleep(5)
raise ValueError("This is a sample error.")
except Exception as e:
# Notify the Monitor about the error
monit.notify(SetupError, e)
# monit.notify_and_exit(SetupError, e)
monit.end()
if __name__ == "__main__":
main()
Tipos de erros:
SetupError
DatabaseError
HTTPError
FileError
FolderError
TooManyRequests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
monit-agd-1.1.2.tar.gz
(5.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file monit-agd-1.1.2.tar.gz.
File metadata
- Download URL: monit-agd-1.1.2.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4e4737691f532518250e646236d7e243682e9bc29a87bee2c9f3be669835904
|
|
| MD5 |
fa803ae5f5e82de347ea5b9c74f2540e
|
|
| BLAKE2b-256 |
bda6b5f88d454c0cb47f1b28153623f4a99c2d582c09e7c3aca559475d048496
|
File details
Details for the file monit_agd-1.1.2-py3-none-any.whl.
File metadata
- Download URL: monit_agd-1.1.2-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fd0b0dba0f676e69c09c04b0b1361735c434bdf0ce3bfa49262a85818cf6e72
|
|
| MD5 |
b7aab575c0fdb7c214da6817abd01255
|
|
| BLAKE2b-256 |
f29c8940f7c12265cb5d1d4b9465062575a297ed66631e0890d2b683bd5b9e4a
|