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 git+https://github.com/Agencia-de-Dados-bsb/monit.git
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.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.0.tar.gz
(5.0 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.0.tar.gz.
File metadata
- Download URL: monit-agd-1.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36902ac0f245871c4726370a29f9f71b6fbb320c57db25ee2446cdd96e44b73a
|
|
| MD5 |
6f5bb805510cfa54a8542a5d7de6bcd7
|
|
| BLAKE2b-256 |
4cd39daec62f003f036dabd36283a24c0a0b52491c7a118e3361602234aa4bdd
|
File details
Details for the file monit_agd-1.0-py3-none-any.whl.
File metadata
- Download URL: monit_agd-1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 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 |
ec0701786dcb6576af684cf125a2fa0dc1388f87cfad9bb10850625c78e0bec8
|
|
| MD5 |
87445364e63099f79cf8609bc9aec58a
|
|
| BLAKE2b-256 |
f9c7c07bc60ef6a6ab5a45febce22b2c1a6763c2c02eaba16b42c62a51cc0409
|